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

fix(jest-config): move json behind ts #10572

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@
### Chore & Maintenance

- `[jest-resolve]` Replace read-pkg-up with escalade package ([10558](https://github.com/facebook/jest/pull/10558))
- `[jest-config]` Change default file extension order by moving json behind ts and tsx ([10572](https://github.com/facebook/jest/pull/10572))
jackneer marked this conversation as resolved.
Show resolved Hide resolved

### Performance

Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Expand Up @@ -476,7 +476,7 @@ An array of directory names to be searched recursively up from the requiring mod

### `moduleFileExtensions` [array\<string>]

Default: `["js", "json", "jsx", "ts", "tsx", "node"]`
Default: `["js", "jsx", "ts", "tsx", "json", "node"]`

An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order.

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/Defaults.ts
Expand Up @@ -36,7 +36,7 @@ const defaultOptions: Config.DefaultOptions = {
maxConcurrency: 5,
maxWorkers: '50%',
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
moduleNameMapper: {},
modulePathIgnorePatterns: [],
noStackTrace: false,
Expand Down