Skip to content

Commit 81be4df

Browse files
test(server): fail fast when navigate errors before the title read
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 573a8e0 commit 81be4df

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎apps/server/src/preview/ServerBrowser.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,11 @@ it.effect.each([
649649
input: { url: heavy, timeoutMs: 4_000 },
650650
})
651651
.pipe(Effect.forkScoped);
652-
yield* Effect.promise(() => titleRequested.promise);
653-
if (renderer === "busy") {
652+
const titleRead = yield* Effect.raceFirst(
653+
Effect.promise(() => titleRequested.promise).pipe(Effect.as(true)),
654+
Fiber.await(result).pipe(Effect.as(false)),
655+
);
656+
if (titleRead && renderer === "busy") {
654657
yield* Effect.promise(() => vi.advanceTimersByTimeAsync(250));
655658
}
656659
const status = yield* Fiber.join(result);

0 commit comments

Comments
 (0)