-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstryker.validation.conf.mjs
More file actions
86 lines (75 loc) · 1.93 KB
/
stryker.validation.conf.mjs
File metadata and controls
86 lines (75 loc) · 1.93 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
* @type {import('@stryker-mutator/api/core').PartialStrykerOptions}
*/
export default {
packageManager: 'npm',
reporters: ['html', 'clear-text', 'progress'],
testRunner: 'jest',
coverageAnalysis: 'perTest',
// Focus specifically on validation module that was just fixed
mutate: [
'src/utils/validation.ts'
],
ignore: [
'src/**/*.test.ts',
'src/**/*.spec.ts',
'tests/**/*',
'dist/**/*',
'node_modules/**/*'
],
// Jest configuration optimized for validation testing
jest: {
projectType: 'custom',
config: {
preset: 'ts-jest/presets/default-esm',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapping: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testMatch: [
'<rootDir>/tests/unit/utils/validation.test.ts',
'<rootDir>/tests/unit/**/validation*.test.ts'
],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
useESM: true,
tsconfig: {
module: 'ESNext',
target: 'ESNext'
}
}]
}
}
},
checkers: ['typescript'],
tsconfigFile: 'tsconfig.json',
// Higher thresholds for critical security module
thresholds: {
high: 95,
low: 85,
break: 75
},
timeoutMS: 120000, // Longer timeout for DOMPurify operations
timeoutFactor: 3,
concurrency: 2, // Lower concurrency for focused testing
htmlReporter: {
fileName: 'validation-mutation-report.html'
},
logLevel: 'info',
plugins: [
'@stryker-mutator/jest-runner',
'@stryker-mutator/typescript-checker'
],
// Focus on security-relevant mutations
mutator: {
plugins: ['typescript'],
excludedMutations: [
// Keep these mutations as they're critical for security testing
// 'ConditionalExpression',
// 'EqualityOperator',
// 'LogicalOperator'
]
}
};