-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
45 lines (45 loc) · 1.12 KB
/
Copy pathjest.config.cjs
File metadata and controls
45 lines (45 loc) · 1.12 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
40
41
42
43
44
45
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
roots: ['<rootDir>'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': ['ts-jest', {
useESM: true,
tsconfig: {
module: 'esnext',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
}
}],
},
transformIgnorePatterns: [
'node_modules/(?!(@octokit|@langchain|universal-user-agent|before-after-hook|deprecation)/)'
],
extensionsToTreatAsEsm: ['.ts'],
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
testMatch: [
'**/tests/**/*.test.ts',
'**/__tests__/**/*.test.ts'
],
testPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/tests/setup.ts'
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/cli.ts',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};