tachybase_todo/jest.config.js

32 lines
821 B
JavaScript
Raw Normal View History

const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.jest.json');
2020-10-24 15:34:43 +08:00
module.exports = {
2021-12-07 19:40:30 +08:00
collectCoverage: false,
2021-12-06 21:23:34 +08:00
verbose: true,
testEnvironment: 'jsdom',
2020-10-24 15:34:43 +08:00
preset: 'ts-jest',
2021-12-06 21:23:34 +08:00
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
2022-02-15 11:02:56 +08:00
setupFilesAfterEnv: [require.resolve('jest-dom/extend-expect'), './jest.setup.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
2021-05-23 08:38:08 +08:00
globals: {
'ts-jest': {
2021-12-06 21:23:34 +08:00
babelConfig: false,
tsconfig: './tsconfig.jest.json',
2021-05-23 08:38:08 +08:00
diagnostics: false,
},
},
2022-02-15 11:02:56 +08:00
modulePathIgnorePatterns: ['/esm/', '/lib/'],
2021-12-06 21:23:34 +08:00
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/',
'/esm/',
'/lib/',
'package.json',
'/demo/',
'package-lock.json',
],
2022-02-15 11:02:56 +08:00
};