Commit graph

3 commits

Author SHA1 Message Date
toyamarinyon
fac02d8544
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
2021-06-16 15:51:58 +00:00
Quinn Turner
6d4395f22c
fix: Order moduleFileExtensions left-to-right (#18328)
Order moduleFileExtensions from most used to least used extensions.

Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring
and facebook/jest#7616
2020-10-27 20:20:03 +00:00
Erik
268d3572bc
[examples] with-ts-eslint-jest example app (#12025)
* set up with-ts-eslint-jest example app

* eslint ignore new app bc it has a conflicting eslintrc

* make eslint + husky setup manual

* clarify app README setup notes

* move page tests out of pages/ dir

* Simplifying configs

* extend "prettier"

* format fix

* Updated rules

* Added husky configs and removed debug option

* Removed notes and configuration

* Updated pages

* Added links to readme

* Added example to .prettierignore

* Updated snap

* Make the lint work

Co-authored-by: Luis Alvarez D <luis@vercel.com>
2020-05-25 13:16:06 -05:00