File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ vi.mock('preact', async (importOriginal) => {
1010} ) ;
1111
1212// Silence console noise from iframe warning in App
13- vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => { } ) ;
13+ vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => undefined ) ;
1414
1515describe ( 'index.tsx' , ( ) => {
1616 beforeEach ( ( ) => {
1717 // Clean up spies between tests
1818 vi . restoreAllMocks ( ) ;
1919 // Re-silence console.warn after restore
20- vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => { } ) ;
20+ vi . spyOn ( console , 'warn' ) . mockImplementation ( ( ) => undefined ) ;
2121
2222 // Default state and environment
2323 ( utils . loggedIn as { value : number } ) . value = utils . AppState . LoggedOut ;
@@ -164,7 +164,9 @@ describe('index.tsx', () => {
164164 vi . doMock ( 'preact-iso' , ( ) => ( {
165165 LocationProvider : ( { children } : { children ?: any } ) => < div > { children } </ div > ,
166166 Router : ( { children, onRouteChange } : { children ?: any ; onRouteChange ?: ( ) => void } ) => {
167- onRouteChange && onRouteChange ( ) ;
167+ if ( onRouteChange ) {
168+ onRouteChange ( ) ;
169+ }
168170 return < div > { children } </ div > ;
169171 } ,
170172 Route : ( { children } : { children ?: any } ) => < div > { children } </ div > ,
You can’t perform that action at this time.
0 commit comments