firebase / firebase/firebase-functions-test

Online mode redirected to emulators

Open
#76 8 comments 14 reactions 0 assignees View on GitHub
triaged type: feature request
Dominant language
TypeScript
Stars
248
Forks
63
PR merge metrics
No merged PRs in 30d

Description

I am attempting to follow the tutorial provided here:
https://firebase.google.com/docs/functions/unit-testing#online-mode

This code block defines where the firebase services are found on the network, as well as what auth creds to use:
```
// At the top of test/index.test.js
const test = require('firebase-functions-test')({
databaseURL: 'https://my-project.firebaseio.com',
storageBucket: 'my-project.appspot.com',
projectId: 'my-project',
}, 'path/to/serviceAccountKey.json');
```

We are trying to write our tests to interact with firebase emulator services. For example, we wish for the test suite to interact with our local emulated version of firestore.

We have been banging our heads trying to get this suite to redirect to local services without success. I would sincerely appreciate any guidance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.