We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are using the new jsx runtime using vite-react-jsx, but this causes an error when we run tests. I have reproduced it here: https://github.com/jonrimmer/vite-jest/tree/problem-jsx
The app runs fine when I run pnpnm dev, but when I run pnpm jest:unit on react-app-ts example, I get an error saying React is not defined...
pnpnm dev
pnpm jest:unit
react-app-ts
React
FAIL src/App.test.tsx ✕ renders learn react link (52 ms) ● renders learn react link ReferenceError: React is not defined 7 | const [count, setCount] = useState(initial); 8 | > 9 | return ( | ^ 10 | <div className={styles.app}> 11 | <header className={styles.appHeader}> 12 | <img src={logo} className={styles.appLogo} alt="logo" /> at App (src/App.tsx:9:3) at Object.<anonymous> (src/App.test.tsx:5:3) console.error Error: Uncaught [ReferenceError: React is not defined]
...but the React import should be automatically added when I am using vite-react-jsx.
vite-react-jsx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We are using the new jsx runtime using vite-react-jsx, but this causes an error when we run tests. I have reproduced it here: https://github.com/jonrimmer/vite-jest/tree/problem-jsx
The app runs fine when I run
pnpnm dev
, but when I runpnpm jest:unit
onreact-app-ts
example, I get an error sayingReact
is not defined......but the React import should be automatically added when I am using
vite-react-jsx
.The text was updated successfully, but these errors were encountered: