test(runbook): drill 상수 판정 검사가 지금의 문자열 판정 모양도 찾는다
문제 tests/unit/runbook-drill.test.ts의 "상수 판정 금지" 검사는 옛 모양 (assertion(..., true), Asserted: true)만 찾는다. drill은 이제 verdict()로 "PASS"/"FAIL" 문자열을 쓴다. 지난 리뷰 변이(:238의 verdict(await builtAssetsPresent(...))를 상수 "PASS"로)가 이 검사를 통과했다. 고른 방법 - assertion(..., "PASS"), *Asserted / *AsExpected: "PASS", verdict(true) 모양을 더 찾는다. 옛 정규식 셋은 그대로 둔다. 위험·한계 - 문자열을 변수에 담아 넘기는 우회는 이 정적 검사가 못 본다. 그 경우는 동작 테스트(FE-RB-002 등)가 본다. 검증 - 검사 통과. 리뷰의 변이를 다시 넣으면 이 검사가 실패한다(되돌림). Refs: docs/reviews/2026-11-03-maturity-review/11-tests-browser-release-scale.md 0929/11-08
This commit is contained in:
@@ -125,5 +125,10 @@ describe("runbook drill verdicts", () => {
|
||||
expect(source).not.toMatch(/assertion\([^;]*,\s*true\s*\)/u);
|
||||
expect(source).not.toMatch(/Asserted:\s*true\b/u);
|
||||
expect(source).not.toMatch(/injectedMountFailure\s*=\s*true/u);
|
||||
// 0929/11-08. The drill records string verdicts now; the patterns above
|
||||
// only knew the old boolean shape, so a constant "PASS" went unnoticed.
|
||||
expect(source).not.toMatch(/assertion\([^;]*,\s*["']PASS["']\s*,?\s*\)/u);
|
||||
expect(source).not.toMatch(/(?:Asserted|AsExpected):\s*["']PASS["']/u);
|
||||
expect(source).not.toMatch(/verdict\(\s*true\s*\)/u);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user