next.js
fac02d85 - Follow the breaking change of jest-config (#26082)

Commit
4 years ago
Follow the breaking change of jest-config (#26082) ## Documentation / Examples When I create a new application using Next.js and use `jest` or `react-testing-library`, I get the following error. ``` The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined ``` This is because `jest-config` changed the default testing environment to node in 27.0. > `jest-config@27.0.0` default to Node testing environment instead of browser (JSDOM) (#9874) Raised the jest version of `with-typescript-eslint-jest` to 27.0 to make it pass the test. - [x] Make sure the linting passes
Author
Parents
Loading