Skip to content

Commit 4cba6d8

Browse files
test(relay): deleted-tunnel mark test asserts the claim without optional chaining
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 445bc37 commit 4cba6d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎infra/relay/src/environments/ManagedEndpointProvider.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,11 +1440,12 @@ describe("ManagedEndpointProvider", () => {
14401440
}
14411441
// The tunnel is gone; without the mark the tunnel limit would keep counting it.
14421442
const claim = allocationCalls.find((call) => call.operation === "claimDeprovision");
1443+
if (claim === undefined) return expect.unreachable("deprovision never claimed the row");
14431444
expect(allocationCalls.at(-1)).toMatchObject({
14441445
operation: "claimRelease",
14451446
input: {
14461447
tunnelId: "tunnel-id",
1447-
generation: (claim?.input as { generation: number }).generation + 1,
1448+
generation: (claim.input as { generation: number }).generation + 1,
14481449
markReleased: true,
14491450
},
14501451
});

0 commit comments

Comments
 (0)