You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rules tests that assert on an un-awaited rule.run() result may pass vacuously #1863
Found while typechecking packages/rules tests (#1859, pub#1862). rule.run() returns Promise<RuleResult> | RuleResult. Many tests use the result without await; with a matcher such as toBeUndefined, not.toContain, toBe(false) or a length check on .items, the assertion runs against a Promise and can pass whatever the rule does. A heuristic grep flagged 20 files; the 10 most likely: empty-heading, form-field-multiple-labels-1249, identical-links-same-purpose, no-contextual-inbound, dom-size, content-unrendered-markup, probe-path-not-approved-1655, framework-data-payload-1143, security/leaked-secrets-budget-overrun-1556, security/leaked-secrets-public-tier (all under packages/rules/tests). packages/rules/tsconfig.test.json (not in CI yet) reports 952 errors, mostly this pattern.
Acceptance Criteria
Every rules test awaits rule.run() (or uses a helper that does) before asserting on its result.
Each test in the 10 files above is shown to fail when the rule's verdict is inverted (one mutation check per file, listed in the PR), or is fixed so it does.
bunx tsgo --noEmit -p packages/rules/tsconfig.test.json reaches 0 errors and is wired into the package typecheck, so CI keeps it at 0.
Activity
test(rules): await rule.run() in the ten flagged tests #1863
test(rules): await rule.run() across the rules tests, typecheck tests…