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
Result:
It errors on the <App/> word saying: Support for the experimental syntax 'jsx' isn't currently enabled. Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
On Vite documentation, I don't see anywhere stating how to use jest to test React component. Does anyone know? Thanks!
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to test React components.
Step 1) I've created a file
App.test.jsx
:Step 2) On command line, run
jest
Result:
It errors on the
<App/>
word saying:Support for the experimental syntax 'jsx' isn't currently enabled. Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
On Vite documentation, I don't see anywhere stating how to use jest to test React component. Does anyone know? Thanks!
The text was updated successfully, but these errors were encountered: