Skip to content

Commit 89d3a31

Browse files
t3dotggclaude
andcommitted
test(server): the displacement case uses a theme that sorts first
The earlier id sorted after the large themes, so the reader skipped it and the case passed on the old code too. This one is served and pushes the last large theme out, which the old code reported as a success. Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent bafb733 commit 89d3a31

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/server/src/environmentTheme.test.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,16 @@ it.layer(NodeServices.layer)("environment theme", (it) => {
241241
assert.strictEqual(refused.reason, "not-published");
242242
assert.deepEqual(yield* served, { id: "zz-look", ...NIGHTFALL_THEME });
243243

244-
// A new theme that sorts first would be served and push the last one out.
244+
// A new theme that sorts first fits, and the last large one no longer does.
245+
const before = (yield* themes.current).map((theme) => theme.id);
245246
const displacing = yield* themes
246-
.apply({ themeId: "ab-new", theme: large("Displacing") })
247+
.apply({ themeId: "a0-first", theme: large("Displacing") })
247248
.pipe(Effect.flip);
248249
assert.strictEqual(displacing.reason, "not-published");
249-
assert.deepEqual(yield* served, { id: "zz-look", ...NIGHTFALL_THEME });
250-
assert.isFalse((yield* themes.current).some((theme) => theme.id === "ab-new"));
250+
assert.deepEqual(
251+
(yield* themes.current).map((theme) => theme.id),
252+
before,
253+
);
251254
}),
252255
);
253256
});

0 commit comments

Comments
 (0)