Skip to content

Commit

Permalink
Remove unused navigate Mock
Browse files Browse the repository at this point in the history
 (#67)
  • Loading branch information
kimurash committed Dec 16, 2024
1 parent a3866b8 commit c2151cb
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions frontend/test/routes/home.books.bookId/route.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type * as remixrunCloudflare from '@remix-run/cloudflare';
import { ActionFunctionArgs, LoaderFunctionArgs } from '@remix-run/cloudflare';
import type * as remixrunReact from '@remix-run/react';
import { createRemixStub } from '@remix-run/testing';
import { screen, waitFor } from '@testing-library/react';
import { customRender } from 'test/helpers/wrapper';
Expand All @@ -25,20 +24,6 @@ vi.mock('@remix-run/cloudflare', async (importOriginal) => {
};
});

const { navigateMock } = vi.hoisted(() => {
return {
navigateMock: vi.fn(),
};
});

vi.mock('@remix-run/react', async (importOriginal) => {
const actual = await importOriginal<typeof remixrunReact>();
return {
...actual,
useNavigate: () => navigateMock,
};
});

const BookDetailStub = createRemixStub([
{
path: '/home/books/:bookId',
Expand Down

0 comments on commit c2151cb

Please sign in to comment.