-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathjest.config.js
More file actions
39 lines (39 loc) · 1011 Bytes
/
jest.config.js
File metadata and controls
39 lines (39 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests'],
testMatch: ['**/*.test.ts'],
collectCoverage: true,
collectCoverageFrom: [
'behaviourTree/**/*.ts',
'core/**/*.ts',
'fsm/**/*.ts',
'utilityAI/**/*.ts',
'!behaviourTree/index.ts',
'!behaviourTree/**/index.ts',
'!core/index.ts',
'!fsm/index.ts',
'!utilityAI/index.ts',
'!utilityAI/**/index.ts',
'!**/*.d.ts',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
verbose: true,
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tsconfig.test.json',
}],
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
},
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
// 分离常规测试和性能测试,暂时排除FSM测试直到类型问题修复
testPathIgnorePatterns: [
'/node_modules/',
'/tests/performance/',
'/tests/fsm/',
],
};