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