Since the onUserCreation Cloud Function is being wrapped by testEnv.wrap in the beforeEach part of the test, the onUserCreation should be creating the user document in the devApp.
Actual behavior
When testTarget is called the WrappedFunction is creating the user document in the production environment instead of the testing environment.
Version info
firebase-functions-test: 0.2.1
firebase-functions: 3.6.2
firebase-admin: 8.12.1
Test case
Function
Test Case
Steps to reproduce
Expected behavior
Since the
onUserCreation
Cloud Function is being wrapped bytestEnv.wrap
in thebeforeEach
part of the test, theonUserCreation
should be creating the user document in thedevApp
.Actual behavior
When
testTarget
is called the WrappedFunction is creating the user document in the production environment instead of the testing environment.