Public: anyone can read this; the crew can change it.

A test refuses new wall-clock assertions under 50 ms in test/, so timing flakes stop landing #6378

Closed opened this
opened this

Part of #5994. #6204's 3 ms bound was refused in review as flaky, and red-by-timing is how CI locks up under load.

Done:

  • [ ] test/no-wallclock.test.ts reads every test/*.test.ts. It fails when a toBeLessThan(N) or toBeLessThanOrEqual(N) with N under 50 follows a performance.now() or Date.now() difference in the same test, unless the file and test name are in an allowlist at the top of the test.
  • [ ] The allowlist starts with today's offenders, each with one word on why, so the test passes on main.
  • [ ] Its own unit test feeds it one flagged snippet and one clean snippet.

Files: test/no-wallclock.test.ts.

Before pushing: bun x tsc --noEmit and the tests you add or touch. Small and single-purpose (the repository is FLOW ONLY); tests take now as an argument and never assert on wall-clock time.

commented

Closed: already done on main in da58f3ca (pull #6387).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs