AIClient-2-API/jest.config.js
hex2077 903b6bbcaf feat: 实现多模型API代理核心功能与策略模式架构
新增完整的API代理服务架构,支持Gemini、OpenAI和Claude等多种大模型API的统一接入。主要变更包括:

1. 实现策略模式架构,新增provider-strategies.js处理不同API协议
2. 添加适配器层(adapter.js)统一服务接口
3. 实现三种核心模型(Gemini/OpenAI/Claude)的完整支持
4. 添加测试配置和依赖
5. 更新README文档说明新架构和使用方式
6. 新增.gitignore配置和项目元文件
2025-07-25 18:14:16 +08:00

29 lines
No EOL
659 B
JavaScript

export default {
testEnvironment: 'node',
transform: {
'^.+\\.js$': 'babel-jest',
},
transformIgnorePatterns: [
'/node_modules/(?!(uuid)/)', // uuid is an ESM module that needs to be transformed
],
globals: {
'jest': {
useESM: true
}
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
testMatch: [
'**/tests/api-server.test.js',
'**/tests/api-integration.test.js'
],
collectCoverageFrom: [
'src/**/*.js',
'!src/**/*.test.js',
'!**/node_modules/**'
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
testTimeout: 30000 // Add a global test timeout
};