-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
26 lines (23 loc) · 870 Bytes
/
jest.config.ts
File metadata and controls
26 lines (23 loc) · 870 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
import type { Config } from 'jest';
// Silence pino logs during tests
process.env.LOG_LEVEL = 'silent';
const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/src/tests/**/*.test.ts'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', 'embedder\\.test\\.ts$', 'search-quality\\.test\\.ts$'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@huggingface/transformers$': '<rootDir>/src/tests/__mocks__/huggingface-transformers.ts',
'^chokidar$': '<rootDir>/src/tests/__mocks__/chokidar.ts',
'^mime$': '<rootDir>/src/tests/__mocks__/mime.ts',
'^parse-duration$': '<rootDir>/src/tests/__mocks__/parse-duration.ts',
},
watchman: false,
coverageDirectory: 'coverage',
coverageReporters: ['lcov', 'text-summary'],
};
export default config;