Immediately after npx create-react-app my-app
, I move into the my-app
folder and do CI=true npm test
.
The resulting output is:
> react-scripts test
PASS src/App.test.js
✓ renders learn react link (39ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 4.465s
Ran all test suites.
In package.json
after adding the flag --env=jsdom
to react-scripts test
, I got:
PASS src/App.test.js
✓ renders learn react link (42ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 2.026s, estimated 3s
Ran all test suites.
My expectation is that everything would run in less than 1 second. Can I get it to run faster than shown above if I'm rendering react components in the tests?
Running with yarn
doesn't make a difference.