Skip to content

Commit

Permalink
Add Mock for Firebase Config
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCode92 committed Dec 26, 2024
1 parent a64e213 commit 8065f4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/utils/firebase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ vi.mock("firebase/firestore", async function () {
};
});

vi.mock("@/config/firebase");

const mockUserAuth = {
uid: "123",
displayName: "Test User",
Expand Down
4 changes: 3 additions & 1 deletion tests/setup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as matchers from "@testing-library/jest-dom/matchers";
import { cleanup } from "@testing-library/react";
import { afterEach, expect } from "vitest";
import { afterEach, expect, vi } from "vitest";

expect.extend(matchers);

vi.mock("@/config/firebase");

afterEach(() => {
cleanup();
});

0 comments on commit 8065f4f

Please sign in to comment.