mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
Stryker runs against encryption at rest, medication compliance, the rollups, source ranking, unit conversion and backup validation, with the unit tests that live next to them (vitest.mutation.config.mts). It is too slow for a pull request and runs nightly and on demand (.github/workflows/mutation.yml). scripts/mutation-floors.mjs reads the JSON report and fails when a module scores below its floor in stryker.floors.json, so one well-tested module cannot hide a weak one. The floors sit two points below the first measured scores: crypto 46.9 %, compliance 66.8 %, rollups 41.7 %, source ranking 57.0 %, units 87.4 %, backup validation 25.5 %. @stryker-mutator/vitest-runner 10.0.0 predates Vitest 5, which names a test "describe > test" where the runner still built "describe test". Every test inside a describe block was filtered out of the mutant runs, so nearly every mutant survived (5.5 % across the set). A pnpm patch builds the name the way Vitest 5 does; the Docker dependency stage copies the patches directory, which the frozen install needs.
36 lines
1014 B
JSON
36 lines
1014 B
JSON
{
|
|
"$comment": "Per-module mutation-score floors, checked by scripts/mutation-floors.mjs against reports/mutation/mutation.json. Each floor sits just below the score measured when it was set; raise it when a change raises the score, never lower it to let a run pass. See docs/contributing/testing.md#mutation-testing.",
|
|
"modules": {
|
|
"crypto": {
|
|
"paths": ["src/lib/crypto.ts"],
|
|
"floor": 45
|
|
},
|
|
"compliance": {
|
|
"paths": ["src/lib/analytics/compliance/"],
|
|
"floor": 65
|
|
},
|
|
"rollups": {
|
|
"paths": ["src/lib/rollups/"],
|
|
"floor": 40
|
|
},
|
|
"source-ranking": {
|
|
"paths": [
|
|
"src/lib/analytics/source-priority.ts",
|
|
"src/lib/analytics/source-rank-sql.ts"
|
|
],
|
|
"floor": 55
|
|
},
|
|
"units": {
|
|
"paths": [
|
|
"src/lib/measurements/display-transform.ts",
|
|
"src/lib/glucose.ts"
|
|
],
|
|
"floor": 85
|
|
},
|
|
"backup-validation": {
|
|
"paths": ["src/lib/validations/backup.ts"],
|
|
"floor": 24
|
|
}
|
|
}
|
|
}
|