Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .changeset/soft-poems-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,11 @@ describe('ClerkProvider native client sync', () => {
expect(mocks.clerkInstance.handleUnauthenticated).not.toBe(originalHandleUnauthenticated);
});

// Bootstrap's suppressed device token write would swallow the rotation below.
await act(async () => {
await waitForPendingJsToNativeSync();
});

// Drop the client fetches the bootstrap already made; only the 401 handling matters here.
fetchClient.mockClear();

Expand Down Expand Up @@ -1618,6 +1623,11 @@ describe('ClerkProvider native client sync', () => {
expect(mocks.clerkInstance.handleUnauthenticated).not.toBe(originalHandleUnauthenticated);
});

// Bootstrap fetches the client too, and that fetch fails here, so drain its retries first.
await act(async () => {
await expect(waitForPendingJsToNativeSync()).rejects.toThrow('stale session 401');
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.

fetchClient.mockClear();

await act(async () => {
Expand Down
Loading