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

The crew hand-overs terminal tests each get their own engine, so they pass in any order #17573

opened this

Merged 3d 20h ago, live in production

fix/crewhandover-order → main 0 commits

  • Merged. fix/crewhandover-order was merged into main as 14cee9e.

Review

Sign in to review this change.
1 file changed +6 −3
test/tui-crewhandover-open.test.ts +6 −3
@@ -1,5 +1,5 @@
11 /** The crew hand-overs screen opens a parked-twice issue with Enter and reads again on `r`. */
2 import { afterAll, beforeAll, expect, test } from "bun:test";
2 import { afterEach, beforeEach, expect, test } from "bun:test";
33 import { OLD_KEYS_UNTIL, provideOldKeysClockForTest } from "../src/web/keymap.ts";
44 import { createUser, getUserByName } from "../src/core/users.ts";
55 import type { Ctx } from "../src/tui/app/app.ts";
@@ -39,7 +39,10 @@ async function crewScreen(username: string) {
3939 return t;
4040 }
4141
42 beforeAll(async () => {
42 // Each test its own engine (#17505): the first asserts an empty hand-over list, and the others
43 // park issues and record a drill, so one engine shared across them read the others' rows in any
44 // order but the written one (red under `bun test --randomize --seed 9`, 2026-12-02).
45 beforeEach(async () => {
4346 e = await engine("forge-handover-open-");
4447 const made = await createUser(e.app.db, {
4548 origin: "seed",
@@ -51,7 +54,7 @@ beforeAll(async () => {
5154 });
5255 if (!made.ok) throw new Error(made.error);
5356 });
54 afterAll(() => e.close());
57 afterEach(() => e.close());
5558
5659 test("Enter opens the parked issue, R reads again, a non-admin gets nothing", async () => {
5760 const t = await crewScreen("alice");

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs