Fix jest auto-mocks hoisting on Windows

Summary: ts-jest transformation was not applied on Windows because of wrong pattern in jest.config. Because of this jest.mock calls was not hoisted to the top and were applied after imports.

Reviewed By: mweststrate

Differential Revision: D21379004

fbshipit-source-id: ec52f98228c5d9e58c0832f2ad201a36d6c8534e
This commit is contained in:
Anton Nikolaev
2020-05-04 04:48:02 -07:00
committed by Facebook GitHub Bot
parent fdff6aeae0
commit 018c1f828c

View File

@@ -9,7 +9,7 @@
module.exports = {
transform: {
'^.*__tests__/.*\\.tsx?$': 'ts-jest',
'^.*__tests__(/|\\\\).*\\.tsx?$': 'ts-jest',
'\\.(js|tsx?)$': '<rootDir>/scripts/jest-transform.js',
},
setupFiles: ['<rootDir>/scripts/jest-setup.js'],