Skip to content

Commit

Permalink
fix(config): update test environment options to include database URL
Browse files Browse the repository at this point in the history
  • Loading branch information
elskow committed Nov 20, 2024
1 parent 7ffb9c2 commit 039de6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const serviceAccount = process.env.FIREBASE_SERVICE_ACCOUNT_KEY

let options: admin.AppOptions;
if (process.env.NODE_ENV === "test") {
options = { projectId: "tutortoise-test" };
options = {
projectId: "tutortoise-test",
databaseURL: `http://${process.env.FIREBASE_DATABASE_EMULATOR_HOST}?ns=tutortoise-test`,
};
} else {
options = {
credential: admin.credential.cert(serviceAccount),
Expand Down

0 comments on commit 039de6c

Please sign in to comment.