nocobase/jest.config.js

34 lines
785 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)'],
2021-05-23 00:38:08 +00:00
setupFilesAfterEnv: [
2021-12-06 13:23:34 +00:00
require.resolve('jest-dom/extend-expect'),
'./jest.setup.ts',
2020-10-24 07:34:43 +00:00
],
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,
},
},
2021-12-06 13:23:34 +00:00
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/',
'/esm/',
'/lib/',
'package.json',
'/demo/',
'package-lock.json',
],
}