You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { https } from 'firebase-functions';
import { Timestamp } from 'firebase-admin/firestore';
import * as admin from 'firebase-admin';
admin.initializeApp();
let defaultDatabase = admin.database();
let defaultFirestore = admin.firestore();
@ASE55471 my workaround was to manually add the database url to the index.ts file and then remove it before submitting a production.
functions/src/index.ts
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
admin.initializeApp({
databaseURL: "http://127.0.0.1:9000/?ns=nameProject-default-rtdb", //<- add and remove
});
Version info
**firebase-functions-test:"^2.4.0"
**firebase-functions:"^3.23.0"
**firebase-admin:"^11.0.1"
Test case
function code
test code
I tried fill
databaseURL
without "-default-rtdb" but still throw same error.Relative StackOverflow question I asked: https://stackoverflow.com/questions/73657752/how-to-initialize-admin-sdk-with-firebase-functions-test
Expected behavior
Finish the test without error .
Actual behavior
It throw error.
The text was updated successfully, but these errors were encountered: