diff --git a/package.json b/package.json index 1de76a6..016eb2b 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "devDependencies": { "@faker-js/faker": "^8.4.1", + "@firebase/rules-unit-testing": "^3.0.2", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^15.0.5", "@testing-library/user-event": "^14.5.2", diff --git a/src/components/transactions/CSVUpload.test.tsx b/src/components/transactions/CSVUpload.test.tsx index 590499b..0096d3a 100644 --- a/src/components/transactions/CSVUpload.test.tsx +++ b/src/components/transactions/CSVUpload.test.tsx @@ -20,7 +20,7 @@ const test = defaultTest.extend({ user: userEvent.setup() }) // mock the "writeNewTransactionsBatched" function to cirumvent firebase auth and rules // its already been unit tested so we know it works vi.mock("../../utils/transaction", async (importOriginal) => { - const mod: {} = await importOriginal(); + const mod: NonNullable = await importOriginal(); return { ...mod, writeNewTransactionsBatched: vi.fn(), @@ -29,7 +29,7 @@ vi.mock("../../utils/transaction", async (importOriginal) => { // mock auth.currentUser to simulate a user being signed into website vi.mock("../../utils/firebase", async (importOriginal) => { - const mod: {} = await importOriginal(); + const mod: NonNullable = await importOriginal(); return { ...mod, auth: { currentUser: { uid: "100" } }