tachybase_todo/jest.config.js
2021-12-06 21:23:34 +08:00

34 lines
784 B
JavaScript

const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.jest.json');
module.exports = {
collectCoverage: true,
verbose: true,
testEnvironment: 'jsdom',
preset: 'ts-jest',
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
setupFilesAfterEnv: [
require.resolve('jest-dom/extend-expect'),
'./jest.setup.ts',
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
globals: {
'ts-jest': {
babelConfig: false,
tsconfig: './tsconfig.jest.json',
diagnostics: false,
},
},
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/',
'/esm/',
'/lib/',
'package.json',
'/demo/',
'package-lock.json',
],
}