Skip to content

Commit f6864f1

Browse files
committed
fix(relay): narrow superseded notification phase assertion for typecheck
1 parent 7e47494 commit f6864f1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎infra/relay/src/agentActivity/ApnsDeliveries.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,10 +1074,11 @@ describe("ApnsDeliveries", () => {
10741074
},
10751075
});
10761076
// Superseded completions omit phase/updatedAt so the push survives resume.
1077-
const supersededNotification = queuedJobs[0]?.payload;
1077+
const supersededPayload = queuedJobs[0]?.payload;
1078+
expect(supersededPayload?.kind).toBe("push_notification");
10781079
expect(
1079-
supersededNotification && "notification" in supersededNotification
1080-
? supersededNotification.notification.phase
1080+
supersededPayload?.kind === "push_notification"
1081+
? supersededPayload.notification?.phase
10811082
: "missing",
10821083
).toBeUndefined();
10831084
}).pipe(

0 commit comments

Comments
 (0)