You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{beforeEach,describe,expect,it}from"vitest"import{WrappedV2CallableFunction,wrapV2}from"firebase-functions-test/lib/v2"import{callable}from"."describe("auth testing",()=>{letcallableFunc: WrappedV2CallableFunction<any>beforeEach(()=>{callableFunc=wrapV2(callable)})it("should return the email from the request",async()=>{constemail='[email protected]';constrequest: any={auth: {uid: "test",token: {email: email,}}}expect(awaitcallableFunc(request)).equals(email)})})
However, this isn't ideal, since it may be preferable to not lose typing. For that, I'll make a PR that should make it easier to test callable functions.
I'm trying to test authorization in my function, but
auth.token
object needed lots of properties which I don't needI also don't need
acceptsStreaming
andrawRequest
, but that has been talked about in #257The text was updated successfully, but these errors were encountered: