Elffuss BraidHub

kikocis/continue public

fix: workosauthprovider test
Changesete5974e20392a092f71072b89bb6faa5a75cd108976318b4e9fe2354c7f7a2112
AuthorNate <sestinj@gmail.com> · 2025-07-08 08:28 -07:00
CommitterNate <sestinj@gmail.com> · 2025-07-08 08:28 -07:00
Parentsee10212b5fd2

Browse the files at this changeset

1 file changed

modified extensions/vscode/src/stubs/WorkOsAuthProvider.vitest.ts +2 −2
@@ -641,7 +641,7 @@
641641 }
642642 });
643643
644-it("should remove expired tokens when refresh fails", async () => {
644+it("should remove expired tokens when refresh fails with a 401 error", async () => {
645645 // Mock Date.now to return a time that makes tokens appear expired
646646 const originalDateNow = Date.now;
647647 const futureTime = Date.now() + 7200000; // 2 hours in the future
@@ -675,7 +675,7 @@
675675 global.setInterval = vi.fn().mockReturnValue(123 as any);
676676
677677 // Refresh will fail with network error
678- fetchMock.mockRejectedValueOnce(new Error("Network error"));
678+ fetchMock.mockRejectedValueOnce(new Error("401"));
679679
680680 // Setup storage
681681 mockSecretStorageGet.mockResolvedValue(JSON.stringify([expiredSession]));