( cf: CloudFunction<T> | CallableFunction<any, any> )
| 45 | } |
| 46 | |
| 47 | function 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} |
no outgoing calls
no test coverage detected
searching dependent graphs…