Skip to content

Instantly share code, notes, and snippets.

@leejh3224
Created December 25, 2018 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leejh3224/632dfa82ce0bd4def740c2955a691324 to your computer and use it in GitHub Desktop.
Save leejh3224/632dfa82ce0bd4def740c2955a691324 to your computer and use it in GitHub Desktop.
import functions from "firebase-functions-test";
import * as admin from "firebase-admin";
import * as path from "path";
// you can check all these information in firebase console/settings
const projectConfig = {
projectId: "projectId",
databaseURL: "databaseURL"
};
// you should pass projectConfig and path to serviceAccountKey like this
// path.resolve defaults to directory where you're executing test command
// for my case, it's functions directory
const testEnv = functions(projectConfig, path.resolve("service-key.json"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment