firebase / firebase-functions-test

MIT License
231 stars 48 forks source link

feat: add support for v2 callable functions #229

Closed exaby73 closed 1 month ago

exaby73 commented 2 months ago

Description

Closes #163

Code sample

// src/index.ts
import { onCall } from "firebase-functions/v2/https";

export const helloWorld = onCall(request => {
  return { message: "hello" };
});
// test/index.test.ts
import { helloWorld } from "../src/index";

describe("test", () => {
  it('should work', () => {
    const wf = wrap(helloWorld);
    wf(req, res);
  })
})
aIacoella commented 1 month ago

How's it possibile this is not fixed yet...