forked from YishenTu/claudian
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
39 lines (38 loc) · 1.1 KB
/
jest.config.js
File metadata and controls
39 lines (38 loc) · 1.1 KB
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} */
const baseConfig = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.jest.json' }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@test/(.*)$': '<rootDir>/tests/$1',
'^@anthropic-ai/claude-agent-sdk$': '<rootDir>/tests/__mocks__/claude-agent-sdk.ts',
'^obsidian$': '<rootDir>/tests/__mocks__/obsidian.ts',
'^@modelcontextprotocol/sdk/(.*)$': '<rootDir>/node_modules/@modelcontextprotocol/sdk/dist/cjs/$1',
},
transformIgnorePatterns: [
'node_modules/(?!(@anthropic-ai/claude-agent-sdk)/)',
],
};
module.exports = {
projects: [
{
...baseConfig,
displayName: 'unit',
testMatch: ['<rootDir>/tests/unit/**/*.test.ts'],
},
{
...baseConfig,
displayName: 'integration',
testMatch: ['<rootDir>/tests/integration/**/*.test.ts'],
},
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
],
coverageDirectory: 'coverage',
};