Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = {
collectCoverageFrom: ['src/**/*.ts', 'src/**/*.tsx'],
coveragePathIgnorePatterns: ['/node_modules/', '.*\\.d\\.ts'],
coverageThreshold: { global: { lines: 95 } },
globals: {
'ts-jest': {
tsConfig: {
jsx: 'react',
jsxFactory: 'h',
},
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: { '\\.module\\.(c|sc|sa)ss$': 'identity-obj-proxy' },
setupFiles: ['jest-plugin-context/setup'],
transform: jestPreset.transform,
testEnvironment: 'jsdom',
testRegex: '(/(test|__tests__)/(?!_).*|(\\.|/)(test|spec))\\.[jt]sx?$',
}
const { jestPreset } = require('ts-jest')
module.exports = {
collectCoverageFrom: ['src/**/*.ts'],
coveragePathIgnorePatterns: ['/node_modules/', '.*\\.d\\.ts'],
coverageThreshold: { global: { lines: 95 } },
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
setupFiles: ['jest-plugin-context/setup', './jest.setup.js'],
transform: {
...jestPreset.transform,
'^.*\\.s?css$': '/test/_transformers/css.js',
'^.*\\.png$': '/test/_transformers/png.js',
'^.*\\.pug$': '/test/_transformers/pug.js',
},
testEnvironment: 'node',
testRegex: '(/(test|__tests__)/(?!_).*|(\\.|/)(test|spec))\\.[jt]s$',
}