Skip to content

Commit

Permalink
test(settings): remove unused mock (#1140)
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy committed May 24, 2024
1 parent 252bae4 commit 99c8a67
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/routes/Settings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,16 @@ import { MemoryRouter } from 'react-router-dom';

const { ipcRenderer } = require('electron');

import type { AxiosResponse } from 'axios';
import { shell } from 'electron';
import { mockAccounts, mockSettings } from '../__mocks__/mock-state';
import { AppContext } from '../context/App';
import * as apiRequests from '../utils/api/request';
import Constants from '../utils/constants';
import { SettingsRoute } from './Settings';

const mockNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));
jest.spyOn(apiRequests, 'apiRequestAuth').mockResolvedValue({
headers: {
'x-oauth-scopes': Constants.AUTH_SCOPE.join(', '),
},
} as unknown as AxiosResponse);

describe('routes/Settings.tsx', () => {
const updateSetting = jest.fn();
Expand Down

0 comments on commit 99c8a67

Please sign in to comment.