Skip to content

Commit 9e1694d

Browse files
shivamhwpclaude
andcommitted
test(mobile): cover a sign-out and re-sign-in during a widget read
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f070681 commit 9e1694d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ describe("makeRelayDeviceRegistrationRequest", () => {
945945
}),
946946
);
947947

948-
it.effect("drops a snapshot that arrives after the account changed", () =>
948+
it.effect("drops a snapshot that arrives after a sign-out, even on re-sign-in", () =>
949949
Effect.gen(function* () {
950950
const requested = yield* Deferred.make<void>();
951951
const response = yield* Deferred.make<{ readonly aggregate: typeof aggregate }>();
@@ -958,7 +958,8 @@ describe("makeRelayDeviceRegistrationRequest", () => {
958958
refreshActiveLiveActivityRemoteRegistration().pipe(Effect.provide(relay)),
959959
);
960960
yield* Deferred.await(requested);
961-
setAgentAwarenessRelayTokenProvider(() => Promise.resolve("clerk-token-b"), "user-b");
961+
setAgentAwarenessRelayTokenProvider(null);
962+
setAgentAwarenessRelayTokenProvider(() => Promise.resolve("clerk-token-a"), "user-a");
962963
publishWidgetMock.mockClear();
963964
yield* Deferred.succeed(response, { aggregate });
964965
yield* Fiber.join(refresh);

0 commit comments

Comments
 (0)