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
27 lines
784 B
JavaScript
27 lines
784 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
module.exports = {
|
|
transform: {
|
|
'^.*__tests__(/|\\\\).*\\.tsx?$': 'ts-jest',
|
|
'\\.(js|tsx?)$': '<rootDir>/scripts/jest-transform.js',
|
|
},
|
|
setupFiles: ['<rootDir>/scripts/jest-setup.js'],
|
|
moduleNameMapper: {
|
|
'^flipper$': '<rootDir>/app/src',
|
|
'^flipper-doctor$': '<rootDir>/doctor/src',
|
|
'^flipper-pkg$': '<rootDir>/pkg/src',
|
|
'^flipper-pkg-lib$': '<rootDir>/pkg-lib/src',
|
|
},
|
|
clearMocks: true,
|
|
coverageReporters: ['json-summary', 'lcov', 'html'],
|
|
testMatch: ['**/**.node.(js|jsx|ts|tsx)'],
|
|
testEnvironment: 'jest-environment-jsdom-sixteen',
|
|
};
|