From a337b4e4824e4b05a4e7b1304462408c889a52fb Mon Sep 17 00:00:00 2001 From: Matthew Turk Date: Thu, 13 Jun 2024 15:56:47 -0700 Subject: [PATCH] `initializeApp` is back --- .reuse/dep5 | 2 +- spezi-invitation-code/tests/invitationCodeVerifier.test.js | 1 + spezi-invitation-code/tests/invitationCodeVerifierMock.test.js | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index 45917a6..0c94635 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Files: spezi-invitation-code/firebase/* +Files: spezi-invitation-code/firebase/** Copyright: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) License: MIT Comment: All files are part of the Stanford Spezi open-source project. \ No newline at end of file diff --git a/spezi-invitation-code/tests/invitationCodeVerifier.test.js b/spezi-invitation-code/tests/invitationCodeVerifier.test.js index 2816b0f..f055737 100644 --- a/spezi-invitation-code/tests/invitationCodeVerifier.test.js +++ b/spezi-invitation-code/tests/invitationCodeVerifier.test.js @@ -17,6 +17,7 @@ describe("InvitationCodeVerifier", () => { let firestore; beforeAll(() => { + admin.initializeApp(); verifier = new InvitationCodeVerifier(); firestore = admin.firestore(); }); diff --git a/spezi-invitation-code/tests/invitationCodeVerifierMock.test.js b/spezi-invitation-code/tests/invitationCodeVerifierMock.test.js index 46ef0f7..70a035c 100644 --- a/spezi-invitation-code/tests/invitationCodeVerifierMock.test.js +++ b/spezi-invitation-code/tests/invitationCodeVerifierMock.test.js @@ -16,6 +16,7 @@ jest.mock("firebase-admin", () => { runTransaction: jest.fn(), }; return { + initializeApp: jest.fn(), firestore: jest.fn(() => firestore), app: jest.fn(() => ({ delete: jest.fn(), @@ -27,6 +28,7 @@ describe("InvitationCodeVerifier", () => { let firestore; beforeAll(() => { + admin.initializeApp(); firestore = admin.firestore(); firebaseTest.mockConfig({invitationCodePath: "invitationCodes", userPath: "users"}); });