mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
5fe277ee02
* use jest-preset for all but app * separate properties that are the same as the preset for some reason, it doesn't work. you get: ``` Preset ../../jest-preset.js not found. ``` This needs to be investigated. * removes unused/unneeded npm script in `app`, `test:jest`
30 lines
851 B
JavaScript
30 lines
851 B
JavaScript
/** @type { import('@jest/types').Config.InitialOptions } */
|
|
module.exports = {
|
|
// preset: '../../jest-preset.js', // DOES NOT WORK
|
|
// same as preset:
|
|
collectCoverage: false,
|
|
globals: {
|
|
'ts-jest': {
|
|
isolatedModules: true,
|
|
},
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
resetMocks: true,
|
|
resetModules: true,
|
|
testRegex: ['.+\\.test\\.tsx?$'],
|
|
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,
|
|
moduleNameMapper: {
|
|
'\\.(css|less|png)$': '<rootDir>/__mocks__/dummy.ts',
|
|
'^worker-loader!': '<rootDir>/__mocks__/dummy.ts',
|
|
},
|
|
};
|