You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the useMediaQuery hook from your library (btw good job with creating so many useful hooks)
import { useMediaQuery } from "@uidotdev/usehooks";
Over the components we have tests that use jest test library. When I run the react-scripts test I get an error regarding the import of the useMediaQuery "SyntaxError: Cannot use import statement outside a module"
"Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration."
The line it seems to complains is "import * as React from "react";" . Is this something wrong on jest side or something can be done on how we use the "@uidotdev/usehooks" hooks?
The text was updated successfully, but these errors were encountered:
Hello,
I tried to use the useMediaQuery hook from your library (btw good job with creating so many useful hooks)
import { useMediaQuery } from "@uidotdev/usehooks";
Over the components we have tests that use jest test library. When I run the react-scripts test I get an error regarding the import of the useMediaQuery "SyntaxError: Cannot use import statement outside a module"
"Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration."
The line it seems to complains is "import * as React from "react";" . Is this something wrong on jest side or something can be done on how we use the "@uidotdev/usehooks" hooks?
The text was updated successfully, but these errors were encountered: