0

I am trying to write test for desktop component but the component is not being rendered in the jest component as it only works when my isDesktop is true , it is not passing the condition

my component.jsx

import { useMediaQuery } from "@mui/material";

const isDesktop = useMediaQuery("only screen and (min-width: 56.0625rem)");

{isDesktop && <Component />}

already tried this Jest + Material-UI : Correctly mocking useMediaQuery

0 Answers0