-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
57 lines (57 loc) · 1.57 KB
/
jest.config.cjs
File metadata and controls
57 lines (57 loc) · 1.57 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
48
49
50
51
52
53
54
55
56
57
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: [
'**/__tests__/**/*.test.ts',
'**/?(*.)+(spec|test).ts'
],
testPathIgnorePatterns: [
'.*complete-integration\\.test\\.ts$',
'.*user_manager\\.integration\\.test\\.ts$',
'.*saveUser\\.integration\\.test\\.ts$',
'.*oauthPlugin\\.integration\\.test\\.ts$',
'.*gun-Instance\\.integration\\.test\\.ts$',
'.*robust-integration\\.test\\.ts$',
'.*final-integration\\.test\\.ts$',
'.*quick-integration\\.test\\.ts$'
],
transform: {
'^.+\\.ts$': 'ts-jest',
},
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/__tests__/**',
'!src/**/examples/**',
'!src/**/ship/**',
'!src/index.ts'
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
moduleFileExtensions: ['ts', 'js', 'json'],
transformIgnorePatterns: [
'node_modules/(?!(ts-mls|@noble|mlkem|hpke|@zk-kit|@semaphore-protocol|ffjavascript)/)'
],
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.ts'],
testTimeout: 30000,
verbose: true,
forceExit: true,
detectOpenHandles: true,
maxWorkers: 1,
coverageThreshold: {
global: {
branches: 10,
functions: 15,
lines: 20,
statements: 20
}
},
// Mock problematic modules
moduleNameMapper: {
'^gun/sea$': '<rootDir>/src/__tests__/__mocks__/gun-sea.js',
'^gun/sea\\.js$': '<rootDir>/src/__tests__/__mocks__/gun-sea.js',
'^gun$': '<rootDir>/src/__tests__/__mocks__/gun.js',
'^@/(.*)$': '<rootDir>/src/$1'
}
};