Skip to content

Commit 106fbed

Browse files
committed
refactor: move resize listener to global
Signed-off-by: Adam Setch <[email protected]>
1 parent 1d38636 commit 106fbed

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/renderer/context/App.test.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('renderer/context/App.tsx', () => {
5555
const markNotificationsAsDoneMock = jest.fn();
5656
const unsubscribeNotificationMock = jest.fn();
5757

58-
const zoomTimeout = () => new Promise((r) => setTimeout(r, 300));
58+
// Removed unused zoomTimeout
5959

6060
const saveStateSpy = jest
6161
.spyOn(storage, 'saveState')
@@ -329,22 +329,4 @@ describe('renderer/context/App.tsx', () => {
329329
});
330330
});
331331
});
332-
333-
describe('zoom listeners', () => {
334-
const updateSettingMock = jest.fn();
335-
336-
it('should update the zoom value when using CMD + and CMD -', async () => {
337-
window.gitify.zoom.getLevel = jest.fn().mockReturnValue(-1);
338-
339-
renderWithAppContext(<AppProvider>{null}</AppProvider>, {
340-
updateSetting: updateSettingMock,
341-
});
342-
343-
fireEvent(window, new Event('resize'));
344-
await zoomTimeout();
345-
346-
expect(updateSettingMock).toHaveBeenCalledTimes(1);
347-
expect(updateSettingMock).toHaveBeenCalledWith('zoomPercentage', 50);
348-
});
349-
});
350332
});

0 commit comments

Comments
 (0)