refactor(services): 重构服务文件结构,将服务按功能分类到不同目录
- 将服务文件按功能分类到core、ai、analytics、security等目录 - 修复logger导入路径问题,统一使用相对路径 - 更新相关文件的导入路径引用 - 添加新的批量操作组件导出文件 - 修复dashboard页面中的类型错误 - 添加dotenv依赖到package.json
This commit is contained in:
31
dashboard/jest.config.js
Normal file
31
dashboard/jest.config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Jest配置 - 支持TypeScript和React测试
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'jsdom',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
|
||||
moduleNameMapping: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1'
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.(ts|tsx)$': ['ts-jest', {
|
||||
tsconfig: 'tsconfig.json'
|
||||
}],
|
||||
'^.+\\.(js|jsx)$': 'babel-jest'
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
||||
testMatch: [
|
||||
'<rootDir>/src/**/__tests__/**/*.(ts|tsx|js|jsx)',
|
||||
'<rootDir>/src/**/?(*.)(spec|test).(ts|tsx|js|jsx)'
|
||||
],
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{ts,tsx}',
|
||||
'!src/**/*.d.ts',
|
||||
'!src/setupTests.ts',
|
||||
'!src/**/__tests__/**'
|
||||
],
|
||||
coverageDirectory: 'coverage',
|
||||
coverageReporters: ['text', 'lcov', 'html']
|
||||
};
|
||||
Reference in New Issue
Block a user