Firebase Functions have incorrect data when triggered via Unit Tests
I’m trying run unit tests against for my Cloud Functions through the emulator. However, when I call a wrapped onDocumentWritten
function in my unit test, it never receives the proper input data – the value for event.data.after.data()
is always the default placeholder { aString: 'foo', anObject: { a: 'qux', b: 'faz' }, aNumber: 7 }
.