@@ -84,14 +84,6 @@ Object.defineProperty(window, "sessionStorage", {
84
84
value : sessionStorageMock ,
85
85
} ) ;
86
86
87
- Object . defineProperty ( window , "location" , {
88
- value : {
89
- origin : "http://localhost:3000" ,
90
- } ,
91
- configurable : true ,
92
- writable : true ,
93
- } ) ;
94
-
95
87
describe ( "AuthDebugger" , ( ) => {
96
88
const defaultAuthState = EMPTY_DEBUGGER_STATE ;
97
89
@@ -106,7 +98,7 @@ describe("AuthDebugger", () => {
106
98
jest . clearAllMocks ( ) ;
107
99
sessionStorageMock . getItem . mockReturnValue ( null ) ;
108
100
109
- // Supress
101
+ // Suppress console errors in tests to avoid JSDOM navigation noise
110
102
jest . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } ) ;
111
103
112
104
mockDiscoverOAuthMetadata . mockResolvedValue ( mockOAuthMetadata ) ;
@@ -449,18 +441,6 @@ describe("AuthDebugger", () => {
449
441
it ( "should store auth state to sessionStorage before redirect in Quick OAuth Flow" , async ( ) => {
450
442
const updateAuthState = jest . fn ( ) ;
451
443
452
- // Mock window.location.href setter
453
- const originalLocation = window . location ;
454
- const locationMock = {
455
- ...originalLocation ,
456
- href : "" ,
457
- origin : "http://localhost:3000" ,
458
- } ;
459
- Object . defineProperty ( window , "location" , {
460
- writable : true ,
461
- value : locationMock ,
462
- } ) ;
463
-
464
444
// Setup mocks for OAuth flow
465
445
mockStartAuthorization . mockResolvedValue ( {
466
446
authorizationUrl : new URL (
0 commit comments