tachybase_todo/jest.config.js
chenos c1b560e928
feat: rename resourceKey & associatedKey to resourceIndex & associatedIndex (#126)
* resourceIndex & associatedIndex

* resourceIndex & associatedIndex
2021-12-04 16:28:52 +08:00

30 lines
757 B
JavaScript

const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.jest.json');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: [
path.resolve(__dirname, 'dotenv.js'),
],
testMatch: [
// '**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)'
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
modulePathIgnorePatterns: [
"<rootDir>/.dumi/",
"<rootDir>/packages/father-build/",
"<rootDir>/packages/client/lib/"
],
globals: {
'ts-jest': {
babelConfig: true,
tsconfig: 'tsconfig.jest.json',
diagnostics: false,
},
},
};