2020-10-20 10:41:47 -05:00
|
|
|
// We set this specifically for 2 reasons.
|
|
|
|
// 1. It makes sense for both CI tests and local tests to behave the same so issues are found earlier
|
|
|
|
// 2. Any wrong timezone handling could be hidden if we use UTC/GMT local time (which would happen in CI).
|
|
|
|
process.env.TZ = 'Pacific/Easter';
|
2020-09-17 01:59:20 -05:00
|
|
|
|
2017-10-22 00:03:26 -05:00
|
|
|
module.exports = {
|
2017-11-17 09:18:30 -06:00
|
|
|
verbose: false,
|
2020-02-13 14:37:24 -06:00
|
|
|
transform: {
|
2020-04-02 06:34:16 -05:00
|
|
|
'^.+\\.(ts|tsx|js|jsx)$': 'ts-jest',
|
2017-10-22 00:03:26 -05:00
|
|
|
},
|
2020-02-13 14:37:24 -06:00
|
|
|
moduleDirectories: ['node_modules', 'public'],
|
|
|
|
roots: ['<rootDir>/public/app', '<rootDir>/public/test', '<rootDir>/packages', '<rootDir>/scripts'],
|
|
|
|
testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$',
|
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
|
|
|
setupFiles: ['jest-canvas-mock', './public/test/jest-shim.ts', './public/test/jest-setup.ts'],
|
2020-08-20 08:21:42 -05:00
|
|
|
setupFilesAfterEnv: ['./public/test/setupTests.ts'],
|
2020-02-13 14:37:24 -06:00
|
|
|
snapshotSerializers: ['enzyme-to-json/serializer'],
|
|
|
|
globals: { 'ts-jest': { isolatedModules: true } },
|
2020-05-04 08:05:31 -05:00
|
|
|
moduleNameMapper: {
|
|
|
|
'\\.svg': '<rootDir>/public/test/mocks/svg.ts',
|
2020-06-29 12:58:47 -05:00
|
|
|
'\\.css': '<rootDir>/public/test/mocks/style.ts',
|
2020-09-03 01:54:46 -05:00
|
|
|
'monaco-editor/esm/vs/editor/editor.api': '<rootDir>/public/test/mocks/monaco.ts',
|
2020-11-24 03:38:41 -06:00
|
|
|
'^react($|/.+)': '<rootDir>/node_modules/react$1',
|
2020-05-04 08:05:31 -05:00
|
|
|
},
|
2020-09-03 01:54:46 -05:00
|
|
|
watchPathIgnorePatterns: ['<rootDir>/node_modules/'],
|
2017-10-22 00:03:26 -05:00
|
|
|
};
|