Skip to content

Commit 361b662

Browse files
authored
test: remove unused mocks (#1373)
test: unused mocks
1 parent 03fa7ec commit 361b662

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/routes/Settings.test.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { act, fireEvent, render, screen } from '@testing-library/react';
22
import { MemoryRouter } from 'react-router-dom';
33
import { mockAuth, mockSettings } from '../__mocks__/state-mocks';
4-
import { mockPlatform } from '../__mocks__/utils';
54
import { AppContext } from '../context/App';
65
import { SettingsRoute } from './Settings';
76

@@ -14,32 +13,13 @@ jest.mock('react-router-dom', () => ({
1413
}));
1514

1615
describe('routes/Settings.tsx', () => {
17-
let originalPlatform: NodeJS.Platform;
1816
const fetchNotifications = jest.fn();
1917
const resetSettings = jest.fn();
2018

21-
beforeAll(() => {
22-
// Save the original platform value
23-
originalPlatform = process.platform;
24-
mockPlatform('darwin');
25-
});
26-
2719
afterEach(() => {
2820
jest.clearAllMocks();
2921
});
3022

31-
afterAll(() => {
32-
// Restore the original platform value
33-
Object.defineProperty(process, 'platform', {
34-
value: originalPlatform,
35-
});
36-
37-
// Restore the original node env value
38-
Object.defineProperty(process, 'platform', {
39-
value: originalPlatform,
40-
});
41-
});
42-
4323
it('should render itself & its children', async () => {
4424
await act(async () => {
4525
render(

0 commit comments

Comments
 (0)