https://github.com/mattriley/help-jest-react-jsx-esm
https://github.com/mattriley/help-jest-react-jsx-esm
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattriley/help-jest-react-jsx-esm
- Owner: mattriley
- Created: 2022-07-27T01:12:15.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-30T06:39:20.000Z (almost 3 years ago)
- Last Synced: 2024-12-30T18:02:25.632Z (5 months ago)
- Language: JavaScript
- Size: 208 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Help! Jest + React + JSX + ESM
## Setup
1. Install Node 18 or `nvm install` or `nvm use`.
2. Install dependencies with `npm i`.## Start
1. Start the web server with `npm start`.
2. Browse to http://localhost:1234 to see "Hello world" rendered.## Test
1. Run `npm t` which will fail due to not being configured for JSX.
2. Help me get the test passing!## Constraints
- The `type` field in `package.json` must NOT be set to `module`. Source files should end with `.mjs` extension. I have reasons for this.
- Test files must live in `./tests` and may end with `.test.js` or `.test.mjs`.