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

Red after landing: test/capacity.test.ts fails on main #12923

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/12915-red-after-landing-test-capacity-test-ts → main 7 commits fork 1 thread · 1 unresolved

  • Merged. scout/12915-red-after-landing-test-capacity-test-ts was merged into main as f8acfa9.

Review

Sign in to review this change.
1 file changed +3 −2
test/shards-keep-going.test.ts +3 −2
@@ -148,9 +148,10 @@ describe("--impact measures what a test uses beyond loading", () => {
148148 expect(map.get("test/uses.test.ts")).toEqual(["src/used.ts"]);
149149 // A function loading never called is the test's own.
150150 expect(map.get("test/calls.test.ts")).toEqual(["src/loaded.ts"]);
151 // Coverage is by block, not by count: calling again what loading called shows nothing new.
151 // Bun counts a line's hits, and a line run again is the test's (`usedFiles`):
152 // calling again what loading called shows.
152153 // The fast tier judges such a file by imports as well (`fastSet`, by the loads-only entry).
153 expect(map.get("test/again.test.ts")).toEqual([]);
154 expect(map.get("test/again.test.ts")).toEqual(["src/loaded.ts"]);

Correct for Bun 1.4.4 hit counts. Next: this expectation flips if Bun changes coverage granularity again, so cover it with a version check or a single probe test that fails with a clear message.

154155 }, 60_000);
155156
156157 test("without the loads-only test every executed file counts, and the run says so", async () => {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs