From 018c1f828c137956206ac4cf3058a1a96b384857 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Mon, 4 May 2020 04:48:02 -0700 Subject: [PATCH] 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 --- desktop/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/jest.config.js b/desktop/jest.config.js index 1f5d2bafd..4c665249b 100644 --- a/desktop/jest.config.js +++ b/desktop/jest.config.js @@ -9,7 +9,7 @@ module.exports = { transform: { - '^.*__tests__/.*\\.tsx?$': 'ts-jest', + '^.*__tests__(/|\\\\).*\\.tsx?$': 'ts-jest', '\\.(js|tsx?)$': '/scripts/jest-transform.js', }, setupFiles: ['/scripts/jest-setup.js'],