Closed idoshamun closed 5 years ago
firebase-functions-test: 0.1.3
firebase-functions: 2.0.2
firebase-admin: 5.13.1
The function makeChange returns an object with properties after and before which are objects instead of functions as described here: https://firebase.google.com/docs/firestore/extend-with-functions
makeChange
after
before
import firebaseFunctionTest from 'firebase-functions-test'; const projectId = process.env.GCLOUD_PROJECT; const test = firebaseFunctionTest({ databaseURL: `https://${projectId}.firebaseio.com`, storageBucket: `${projectId}.appspot.com`, projectId, }, process.env.GOOGLE_APPLICATION_CREDENTIALS); const change = test.makeChange({key: 'value'}, {key: 'value2'});
change should have two properties after and before which are functions that return the provided objects.
change
change has two properties after and before which are the provided objects.
I found out that it's my mistake, I need to provide DocumentSnapshot and not plain object
DocumentSnapshot
Version info
firebase-functions-test: 0.1.3
firebase-functions: 2.0.2
firebase-admin: 5.13.1
Test case
The function
makeChange
returns an object with propertiesafter
andbefore
which are objects instead of functions as described here: https://firebase.google.com/docs/firestore/extend-with-functionsSteps to reproduce
Expected behavior
change
should have two propertiesafter
andbefore
which are functions that return the provided objects.Actual behavior
change
has two propertiesafter
andbefore
which are the provided objects.