Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/server/src/peer/PeerLinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,14 +845,15 @@ it.effect("linking a picked machine that answers nowhere names it and links noth
it.live("linking an address with nothing listening says so, unlike one that is not T3 Code", () =>
Effect.scoped(
Effect.gen(function* () {
const closed = yield* Effect.scoped(
serveRaw(() => Effect.succeed(HttpServerResponse.empty({ status: 404 }))),
);
// Listen first: the OS can hand a just-closed port to the next listener.
const notT3 = yield* serveRaw(() =>
Effect.succeed(
HttpServerResponse.text("<h1>Not Found</h1>", { status: 404, contentType: "text/html" }),
),
);
const closed = yield* Effect.scoped(
serveRaw(() => Effect.succeed(HttpServerResponse.empty({ status: 404 }))),
);
const a = yield* makeA(laptop);
const linking = (url: string) =>
a.links.link({ url, pairingCode: "unused", access: "auto" }).pipe(Effect.flip);
Expand Down
Loading