mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
test: expand mutation coverage at protocol boundaries
This commit is contained in:
parent
d3b426d500
commit
9c71b0eb88
2 changed files with 8 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ Use `npm run fix` for mechanical cleanup, review its diff, and run `npm run chec
|
|||
|
||||
Use `npm run test:coverage` to identify source modules and branches that lack exercised behavior. It reports every authored TypeScript source file, including files not imported by tests, while excluding generated app-server bindings. Open `coverage/index.html` to inspect line-level gaps. Coverage is diagnostic and has no pass/fail threshold; prioritize user-visible behavior and state-transition invariants rather than raising the aggregate percentage.
|
||||
|
||||
Use `npm run test:mutation` for an exploratory mutation test of the domain-owned logic under `src/domain/` and `src/features/chat/domain/`. Review surviving mutants individually instead of treating the aggregate score as a quality gate: add tests for meaningful behavior gaps, simplify equivalent or redundant code, and leave mutants alone when neither change improves the durable contract. The run ignores expensive module-initialization mutants, is intentionally manual, and writes its ignored HTML report to `reports/mutation/mutation.html`.
|
||||
Use `npm run test:mutation` for an exploratory mutation test of domain-owned logic, app-server protocol normalization, thread-stream event mapping, and the chat root reducer. Review surviving mutants individually instead of treating the aggregate score as a quality gate: add tests for meaningful behavior gaps, simplify equivalent or redundant code, and leave mutants alone when neither change improves the durable contract. The run ignores expensive module-initialization mutants, is intentionally manual, and writes its ignored HTML report to `reports/mutation/mutation.html`.
|
||||
|
||||
## Commit Messages
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
export default {
|
||||
testRunner: "vitest",
|
||||
coverageAnalysis: "perTest",
|
||||
mutate: ["src/domain/**/*.ts", "src/features/chat/domain/**/*.ts"],
|
||||
mutate: [
|
||||
"src/domain/**/*.ts",
|
||||
"src/app-server/protocol/**/*.ts",
|
||||
"src/features/chat/domain/**/*.ts",
|
||||
"src/features/chat/app-server/mappers/thread-stream/**/*.ts",
|
||||
"src/features/chat/application/state/root-reducer.ts",
|
||||
],
|
||||
ignoreStatic: true,
|
||||
incremental: true,
|
||||
reporters: ["clear-text", "progress", "html"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue