1 Star 0 Fork 533

richardy2016 / NocoBase

forked from NocoBase / NocoBase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jest.config.js 893 Bytes
一键复制 编辑 原始数据 按行查看 历史
Chareice 提交于 2022-10-11 22:30 . fix: run test by jest (#891)
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.json');
module.exports = {
rootDir: process.cwd(),
collectCoverage: false,
verbose: true,
testEnvironment: 'jsdom',
preset: 'ts-jest',
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
setupFiles: ['dotenv/config'],
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/', '/es/', '/dist/', '/lib/'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/',
'/esm/',
'/lib/',
'package.json',
'/demo/',
'package-lock.json',
],
};
TypeScript
1
https://gitee.com/richardy2016/nocobase.git
git@gitee.com:richardy2016/nocobase.git
richardy2016
nocobase
NocoBase
main

搜索帮助