Skip to content
New issue

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

Update Jest to 25.4 #106

Merged
merged 2 commits into from
Apr 26, 2020
Merged

Update Jest to 25.4 #106

merged 2 commits into from
Apr 26, 2020

Conversation

angelocordon
Copy link
Contributor

Use Jest instead of react-scripts as CRA currently uses Jest 24.x.x. Due to an incompatible version of Jest, we're experiencing errors with React Testing Library. See: testing-library/dom-testing-library#477

Alternatively, instead of using jest-environment-jsdom-sixteen as our testing environment, we just drop our need to test using React Scripts and use a later version of Jest (we'll be moving to this anyways when we move to Next).

This PR also adds Babel Runtime and the Transform-Runtime plugin to handle regenerator errors with our asynchronous calls in our specs.
See:
babel/babel#8829
parcel-bundler/parcel#871

At the time of writing, CRA uses Jest 24 and React Testing Library.
This adds the latest version of Jest for us to use instead of using
react-scripts.

Update Github workflow to use Jest instead of react-script.
Add Babel Runtime and Transform Runtime Plugin to handle async
calls in our tests.
@angelocordon angelocordon requested a review from lpatmo April 26, 2020 04:29
@angelocordon angelocordon self-assigned this Apr 26, 2020
Copy link
Member

@lpatmo lpatmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for looking into this! Makes sense to update jest instead of adding that to the npm run test command :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants