2021-05-12 06:35:00 +00:00
|
|
|
/** @type { import('@jest/types').Config.InitialOptions } */
|
|
|
|
module.exports = {
|
2021-05-13 11:29:02 +00:00
|
|
|
// preset: '../../jest-preset.js', // DOES NOT WORK
|
|
|
|
// same as preset:
|
|
|
|
collectCoverage: false,
|
2021-05-12 06:35:00 +00:00
|
|
|
globals: {
|
|
|
|
'ts-jest': {
|
|
|
|
isolatedModules: true,
|
|
|
|
},
|
|
|
|
},
|
2021-05-13 11:29:02 +00:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
2021-05-12 06:35:00 +00:00
|
|
|
resetMocks: true,
|
|
|
|
resetModules: true,
|
|
|
|
testRegex: ['.+\\.test\\.tsx?$'],
|
2021-05-13 11:29:02 +00:00
|
|
|
transform: { '^.+\\.tsx?$': 'ts-jest' },
|
|
|
|
|
|
|
|
// extended from preset:
|
|
|
|
cache: false,
|
|
|
|
modulePathIgnorePatterns: ['<rootDir>/network/.*/__mocks__'],
|
|
|
|
rootDir: 'app',
|
|
|
|
setupFiles: ['./__jest__/setup.ts'],
|
|
|
|
setupFilesAfterEnv: ['./__jest__/setup-after-env.ts'],
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
verbose: true,
|
2021-05-12 06:35:00 +00:00
|
|
|
moduleNameMapper: {
|
|
|
|
'\\.(css|less|png)$': '<rootDir>/__mocks__/dummy.ts',
|
|
|
|
'^worker-loader!': '<rootDir>/__mocks__/dummy.ts',
|
|
|
|
},
|
|
|
|
};
|