Closed blidd-google closed 1 year ago
2nd gen firestore triggers support is coming soon! This PR will add support for mocking 2nd gen firestore triggers.
Example:
// index.ts import { onDocumentCreated } from "firebase-functions/v2/firestore"; export const fn = onDocumentCreated("foo/{bar}", (event) => {...}); // index.test.ts import * as test from "firebase-functions-test"; import { fn } from './index'; const {wrap} = test(); const wrappedFn = wrap(fn); wrappedFn({ data: { a: 'b', c: 'd', }, params: { bar: 123, }, });
2nd gen firestore triggers support is coming soon! This PR will add support for mocking 2nd gen firestore triggers.
Example: