Commit 16f0d4a5 authored by Mostafa Hajizadeh's avatar Mostafa Hajizadeh Committed by Dan Abramov
Browse files

Add "node" to Jest's moduleFileExtensions (#2738)

Jest's default value for this option is ["js", "json", "jsx", "node"].
CRA's current value is ["web.js", "js", "json", "web.jsx", "jsx"], which
is missing one of default ones: "node". This change fixes that.

This "node" extension is used in packages that use native code.
parent 804ac000
Showing with 1 addition and 1 deletion
+1 -1
...@@ -43,7 +43,7 @@ module.exports = (resolve, rootDir, isEjecting) => { ...@@ -43,7 +43,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
moduleNameMapper: { moduleNameMapper: {
'^react-native$': 'react-native-web', '^react-native$': 'react-native-web',
}, },
moduleFileExtensions: ['web.js', 'js', 'json', 'web.jsx', 'jsx'], moduleFileExtensions: ['web.js', 'js', 'json', 'web.jsx', 'jsx', 'node'],
}; };
if (rootDir) { if (rootDir) {
config.rootDir = rootDir; config.rootDir = rootDir;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment