Permalink
Cannot retrieve contributors at this time
12 lines (11 sloc)
487 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
docs/jest.setup.js /
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import failOnConsole from 'jest-fail-on-console' | |
| // Jest tests don't fail in some cases where we would see an error in DevTools | |
| // Console when running locally and we would also see the error in the test | |
| // output. This includes the React `Each child in a list should have a unique | |
| // "key" prop` error example. | |
| // | |
| // To catch this and fail tests in cases like this, we use `jest-fail-on-console` | |
| // to fail on calls to `console.error()`. | |
| failOnConsole({ | |
| shouldFailOnWarn: false, | |
| }) |