forked from xiangwang25/whale-town-end-v2
feat: integrate invitation access, world NPCs, and deployment
This commit is contained in:
29
jest.config.js
Normal file
29
jest.config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
moduleFileExtensions: ['js', 'json', 'ts'],
|
||||
roots: ['<rootDir>/src', '<rootDir>/test'],
|
||||
testRegex: '.*\\.(spec|e2e-spec|integration-spec|perf-spec)\\.ts$',
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
collectCoverageFrom: [
|
||||
'**/*.(t|j)s',
|
||||
],
|
||||
coverageDirectory: '../coverage',
|
||||
testEnvironment: 'node',
|
||||
moduleNameMapper: {
|
||||
'^src/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
// 添加异步处理配置
|
||||
testTimeout: 10000,
|
||||
// 强制退出以避免挂起
|
||||
forceExit: true,
|
||||
// 检测打开的句柄
|
||||
detectOpenHandles: true,
|
||||
// 处理 ES 模块
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!(@faker-js/faker)/)',
|
||||
],
|
||||
// 设置测试环境变量
|
||||
setupFilesAfterEnv: ['<rootDir>/test-setup.js'],
|
||||
};
|
||||
Reference in New Issue
Block a user