Skip to content

Commit 74bb9ea

Browse files
committed
frontend: fix linting
1 parent be24d09 commit 74bb9ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

frontend/src/index.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1515
describe('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>,

0 commit comments

Comments
 (0)