document is not defined in a .test.ts | path missed domIncludes globs, ran in node | rename to .test.tsx or move under a components//hooks/ dir; if a new dir legitimately needs jsdom, add its glob to domIncludes in vitest.config.ts |
| passes alone, fails in full run (leftover bins/selection/toasts) | store state leaked | resetAllStores() in beforeEach; for localStorage tests use createIsolatedLocalStorageMock() + its cleanup() in afterEach |
Cannot pass deleted object mid geometry test | kernel wrapper GC'd — adapter only borrowed the raw kernel | init via initTestKernel() or wasmInit.ts's initBrepjs() in beforeAll; they use OcctWasmAdapter.fromKernel, which retains it |
| desktop e2e fails with mobile selectors after a mobile spec | viewport persists per worker | await resetViewport(page) in afterEach of every viewport-changing test |
| e2e grabs wrong bin or wrong dialog | bin DOM order non-deterministic under parallel workers; Labs drawer is ALWAYS mounted with role="dialog" | getBinByIndex()/getNewestBin() instead of .first()/.last(); getActiveDialog() instead of raw [role="dialog"] |
| many scenario snapshots diff after a generator change | geometry output changed — intended, or a border-clipping regression | inspect deltas for plausibility before -u; large unexplained jumps → geometry-debugging skill |
| snapshots orphaned after renaming a scenario category | snapshot keys are <category> > <name> per scenarioRunner.ts | keep category names stable; if renaming, regenerate and delete stale entries in __snapshots__/ in the same PR |
| coverage fails after adding well-tested code | thresholds are global; untested sibling files elsewhere drag averages | check the text summary for files you touched, add missing sibling tests — never lower thresholds |
| smoke tests fail loading fonts with CORS errors | Vercel bypass token added as extraHTTPHeaders — Playwright sends it to every origin, third parties reject the preflight | pass it as a same-origin bypass cookie via query string (x-vercel-set-bypass-cookie pattern in e2e/smoke/pwa-smoke.spec.ts); header only on direct same-origin API calls |
| kernel/perf test "passes" in CI but never ran | __kernel-tests__/** excluded from root config | run explicitly with vitest.profile.config.ts; keep maxWorkers at 1 — WASM instances are heavy |