diff --git a/scripts/utils/createJestConfig.js b/scripts/utils/createJestConfig.js index 95a550be533..395151afa6a 100644 --- a/scripts/utils/createJestConfig.js +++ b/scripts/utils/createJestConfig.js @@ -21,8 +21,8 @@ module.exports = (resolve, rootDir) => { const config = { moduleFileExtensions: ['jsx', 'js', 'json'], moduleNameMapper: { - '^[./a-zA-Z0-9$_-]+\\.(jpg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': resolve('config/jest/FileStub.js'), - '^[./a-zA-Z0-9$_-]+\\.css$': resolve('config/jest/CSSStub.js') + '^.+\\.(jpg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': resolve('config/jest/FileStub.js'), + '^.+\\.css$': resolve('config/jest/CSSStub.js') }, scriptPreprocessor: resolve('config/jest/transform.js'), setupFiles: setupFiles,