MCPcopy Create free account
hub / github.com/firebase/firebase-functions-test / assertIsCloudFunction

Function assertIsCloudFunction

src/v2.ts:47–55  ·  view source on GitHub ↗
(
  cf: CloudFunction<T> | CallableFunction<any, any>
)

Source from the content-addressed store, hash-verified

45}
46
47function assertIsCloudFunction<T extends CloudEvent<unknown>>(
48 cf: CloudFunction<T> | CallableFunction<any, any>
49): asserts cf is CloudFunction<T> {
50 if (!('run' in cf) || !cf.run) {
51 throw new Error(
52 'This library can only be used with functions written with firebase-functions v3.20.0 and above'
53 );
54 }
55}
56
57/**
58 * Takes a v2 cloud function to be tested, and returns a {@link WrappedV2Function}

Callers 1

wrapV2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…