-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
47 lines (47 loc) · 1.29 KB
/
Copy pathjest.config.js
File metadata and controls
47 lines (47 loc) · 1.29 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
46
47
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests'],
testMatch: ['**/*.test.ts', '**/*.test.js'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverageFrom: [
'sdk/**/*.ts',
'cli/**/*.ts',
'!**/*.d.ts',
'!**/node_modules/**'
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 15,
statements: 15
}
},
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tests/tsconfig.json',
diagnostics: {
ignoreCodes: [151001]
}
}],
'^.+\\.jsx?$': ['ts-jest', {
tsconfig: 'tests/tsconfig.json',
useESM: true,
diagnostics: {
ignoreCodes: [151001]
}
}]
},
testTimeout: 10000,
transformIgnorePatterns: [
// Allow transformation of ESM modules
"node_modules/(?!(p-retry|@coral-xyz/borsh|@solana|fetch-retry|is-network-error|chai)/)"
],
verbose: true,
clearMocks: true,
restoreMocks: true
};