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
The context param should match that from the path of the document.
[REQUIRED] Actual behavior
The context param is undefined.
I haven't tested this outside the emulator.
The text was updated successfully, but these errors were encountered:
noelmansour
changed the title
Cloud functions from Firestore trigger have undefined context parameters
Cloud functions from Firestore trigger have undefined context parameters in emulator tests
Jul 27, 2020
This can also be seen with the RTDB as well. In fact, when running the test from the functions-samples, I get the following output:
Cloud Functions
makeUpperCase
Uppercasing undefined input
✓ should upper case input and write it to /uppercase (919ms)
addMessage
✓ should return a 303 redirect (45ms)
2 passing (975ms)
Note the log containing "undefined" which is referencing a context param:
[REQUIRED] Environment info
firebase-tools: 8.6.0
Platform: macOS
[REQUIRED] Test case
Create a test that calls a cloud firestore triggered function that references the context parameter, e.g.
[REQUIRED] Steps to reproduce
Run the test using emulator suite:
firebase emulators:exec "npm run test"
[REQUIRED] Expected behavior
The context param should match that from the path of the document.
[REQUIRED] Actual behavior
The context param is undefined.
I haven't tested this outside the emulator.
The text was updated successfully, but these errors were encountered: