Skip to content

Commit 98bf84e

Browse files
committed
test(NavbarModal.test.js): mock useAuthRequired hook to isolate NavbarModal tests from authentication logic
1 parent 7aef73f commit 98bf84e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/navbar/navbar_modal/NavbarModal.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import { IconProvider } from "@logora/debate.icons.icon_provider";
1010
import * as regularIcons from "@logora/debate.icons.regular_icons";
1111
import { Location } from "@logora/debate.util.location";
1212
import { faker } from "@faker-js/faker";
13+
jest.mock("@logora/debate.hooks.use_auth_required", () => ({
14+
useAuthRequired: () => () => {},
15+
}));
1316
import { NavbarModal } from "./NavbarModal";
1417

1518
const routes = {

0 commit comments

Comments
 (0)