Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 committed Aug 1, 2024
1 parent 1fa946d commit 186e034
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/src/app/nav.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect, describe, it, vi } from "vitest";
import { render, fireEvent, screen } from '@testing-library/react'
import Navigation from "./nav";
import { CertificateRequestsTable } from "./certificate_requests/table";
import { User } from "./types";

vi.mock('next/navigation', () => ({
usePathname: () => {
Expand All @@ -13,6 +14,11 @@ vi.mock('next/navigation', () => ({
}
}
}));
vi.mock('./auth/authContext', () => ({
useAuth: () => {
return { "user": {"id": 0, "username": "adman" } as User}
}
}))

describe('Navigation', () => {
it('should open aside when clicking button', () => {
Expand Down

0 comments on commit 186e034

Please sign in to comment.