mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:36:42 +00:00
32 lines
821 B
JavaScript
32 lines
821 B
JavaScript
const { pathsToModuleNameMapper } = require('ts-jest/utils');
|
|
const { compilerOptions } = require('./tsconfig.jest.json');
|
|
|
|
module.exports = {
|
|
collectCoverage: false,
|
|
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,
|
|
},
|
|
},
|
|
modulePathIgnorePatterns: ['/esm/', '/lib/'],
|
|
coveragePathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/__tests__/',
|
|
'/esm/',
|
|
'/lib/',
|
|
'package.json',
|
|
'/demo/',
|
|
'package-lock.json',
|
|
],
|
|
};
|