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

test/contract.test.ts: the 1000-decision timing bound (200 ms) is flaky #952

Closed opened this
Closed without merging

scout/forge:scout/582-test-contract-test-ts-the-1000-decision → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
1 file changed +8 −1
test/check-list.test.ts +8 −1
@@ -6,7 +6,7 @@
66 */
77
88 import { describe, expect, test } from "bun:test";
9 import { readdirSync } from "node:fs";
9 import { readdirSync, readFileSync } from "node:fs";
1010 import { auditGate, EXCLUDED, GATE } from "../scripts/gate.ts";
1111
1212 const root = new URL("..", import.meta.url).pathname;
@@ -20,6 +20,13 @@ describe("the gate's list", () => {
2020 expect(auditGate(present, GATE, EXCLUDED)).toEqual([]);
2121 });
2222
23 test("test/contract.test.ts is gated and keeps no wall-clock bound (#582)", () => {
24 expect(GATE).toContain("test/contract.test.ts");
25 expect(EXCLUDED.map((e) => e.file)).not.toContain("test/contract.test.ts");
26 const source = readFileSync(`${root}test/contract.test.ts`, "utf8");
27 expect(source).not.toMatch(/performance\.now|Date\.now|hrtime/);
28 });
29
2330 test("this guard is itself in the gate", () => {
2431 expect(GATE).toContain("test/check-list.test.ts");
2532 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs