@@ -84,14 +84,6 @@ Object.defineProperty(window, "sessionStorage", {
8484 value : sessionStorageMock ,
8585} ) ;
8686
87- Object . defineProperty ( window , "location" , {
88- value : {
89- origin : "http://localhost:3000" ,
90- } ,
91- configurable : true ,
92- writable : true ,
93- } ) ;
94-
9587describe ( "AuthDebugger" , ( ) => {
9688 const defaultAuthState = EMPTY_DEBUGGER_STATE ;
9789
@@ -106,7 +98,7 @@ describe("AuthDebugger", () => {
10698 jest . clearAllMocks ( ) ;
10799 sessionStorageMock . getItem . mockReturnValue ( null ) ;
108100
109- // Supress
101+ // Suppress console errors in tests to avoid JSDOM navigation noise
110102 jest . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } ) ;
111103
112104 mockDiscoverOAuthMetadata . mockResolvedValue ( mockOAuthMetadata ) ;
@@ -449,18 +441,6 @@ describe("AuthDebugger", () => {
449441 it ( "should store auth state to sessionStorage before redirect in Quick OAuth Flow" , async ( ) => {
450442 const updateAuthState = jest . fn ( ) ;
451443
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-
464444 // Setup mocks for OAuth flow
465445 mockStartAuthorization . mockResolvedValue ( {
466446 authorizationUrl : new URL (
0 commit comments