diff --git a/docs/Configuration.md b/docs/Configuration.md index a31b5be57dc1..e2d93af762f3 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -390,7 +390,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "ts", "tsx", "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. +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. + +We recommend placing the extensions most commonly used in your project on the left, so if you are using TypeScript, you may want to consider moving "ts" and/or "tsx" to the beginning of the array. ### `moduleNameMapper` [object] diff --git a/website/versioned_docs/version-22.0/Configuration.md b/website/versioned_docs/version-22.0/Configuration.md index aad44be11883..bf21f633b80c 100644 --- a/website/versioned_docs/version-22.0/Configuration.md +++ b/website/versioned_docs/version-22.0/Configuration.md @@ -276,9 +276,9 @@ return { Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-22.1/Configuration.md b/website/versioned_docs/version-22.1/Configuration.md index ce6b83b56c99..9172950c52db 100644 --- a/website/versioned_docs/version-22.1/Configuration.md +++ b/website/versioned_docs/version-22.1/Configuration.md @@ -274,9 +274,9 @@ return { Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-22.2/Configuration.md b/website/versioned_docs/version-22.2/Configuration.md index 77c9dc204d80..ec9ddef9086b 100644 --- a/website/versioned_docs/version-22.2/Configuration.md +++ b/website/versioned_docs/version-22.2/Configuration.md @@ -274,9 +274,9 @@ return { Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-22.3/Configuration.md b/website/versioned_docs/version-22.3/Configuration.md index 0a05221fa957..348c22e76aec 100644 --- a/website/versioned_docs/version-22.3/Configuration.md +++ b/website/versioned_docs/version-22.3/Configuration.md @@ -259,9 +259,9 @@ This option allows the use of a custom global teardown module which exports an a Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-22.4/Configuration.md b/website/versioned_docs/version-22.4/Configuration.md index 85eed4fa1add..f7cf200d878a 100644 --- a/website/versioned_docs/version-22.4/Configuration.md +++ b/website/versioned_docs/version-22.4/Configuration.md @@ -290,9 +290,9 @@ This option allows the use of a custom global teardown module which exports an a Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-23.0/Configuration.md b/website/versioned_docs/version-23.0/Configuration.md index 25da9f689a8a..33032db580b7 100644 --- a/website/versioned_docs/version-23.0/Configuration.md +++ b/website/versioned_docs/version-23.0/Configuration.md @@ -310,9 +310,9 @@ This option allows the use of a custom global teardown module which exports an a Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-23.1/Configuration.md b/website/versioned_docs/version-23.1/Configuration.md index 7b21588fc390..b4f97e2e514a 100644 --- a/website/versioned_docs/version-23.1/Configuration.md +++ b/website/versioned_docs/version-23.1/Configuration.md @@ -310,9 +310,9 @@ This option allows the use of a custom global teardown module which exports an a Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleDirectories` [array] diff --git a/website/versioned_docs/version-23.2/Configuration.md b/website/versioned_docs/version-23.2/Configuration.md index 6e04c635ce57..9ce18c46868d 100644 --- a/website/versioned_docs/version-23.2/Configuration.md +++ b/website/versioned_docs/version-23.2/Configuration.md @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleNameMapper` [object] diff --git a/website/versioned_docs/version-23.3/Configuration.md b/website/versioned_docs/version-23.3/Configuration.md index edaa23b9adbc..e86a11489eee 100644 --- a/website/versioned_docs/version-23.3/Configuration.md +++ b/website/versioned_docs/version-23.3/Configuration.md @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleNameMapper` [object] diff --git a/website/versioned_docs/version-23.4/Configuration.md b/website/versioned_docs/version-23.4/Configuration.md index c7e7a0557e73..bb7f67a5c07b 100644 --- a/website/versioned_docs/version-23.4/Configuration.md +++ b/website/versioned_docs/version-23.4/Configuration.md @@ -322,9 +322,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleNameMapper` [object] diff --git a/website/versioned_docs/version-23.5/Configuration.md b/website/versioned_docs/version-23.5/Configuration.md index ce8bb1ae41ae..f0b8e299b636 100644 --- a/website/versioned_docs/version-23.5/Configuration.md +++ b/website/versioned_docs/version-23.5/Configuration.md @@ -340,9 +340,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleNameMapper` [object] diff --git a/website/versioned_docs/version-23.6/Configuration.md b/website/versioned_docs/version-23.6/Configuration.md index a687b04524e4..08de1bab0b95 100644 --- a/website/versioned_docs/version-23.6/Configuration.md +++ b/website/versioned_docs/version-23.6/Configuration.md @@ -340,9 +340,9 @@ An array of directory names to be searched recursively up from the requiring mod Default: `["js", "json", "jsx", "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. +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. -If you are using TypeScript this should be `["js", "jsx", "json", "ts", "tsx"]`, check [ts-jest's documentation](https://github.com/kulshekhar/ts-jest). +If you are using TypeScript, you will want to add `"ts"` and/or `"tsx"` to the above default. Where you place these is up to you - we recommend placing the extensions most commonly used in your project on the left. ### `moduleNameMapper` [object]