Skip to content

Commit

Permalink
test-fe: useNavigate 사용 훅 모킹 처리 (#938)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeongwoo Park <[email protected]>
  • Loading branch information
2 people authored and llqqssttyy committed Oct 24, 2024
1 parent 689a989 commit 74be06d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { act, renderHook } from '@testing-library/react';
import ToastProvider from '@contexts/ToastContext';
import useDashboardCreateForm from '.';

jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: jest.fn(),
}));

describe('useDashboardCreateForm', () => {
beforeAll(() => {
localStorage.setItem('clubId', '1');
Expand Down

0 comments on commit 74be06d

Please sign in to comment.