Created
December 25, 2018 06:08
-
-
Save leejh3224/632dfa82ce0bd4def740c2955a691324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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