Gathering detailed insights and metrics for firebase-functions-test
Gathering detailed insights and metrics for firebase-functions-test
Gathering detailed insights and metrics for firebase-functions-test
Gathering detailed insights and metrics for firebase-functions-test
npm install firebase-functions-test
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
236 Stars
177 Commits
54 Forks
56 Watching
60 Branches
63 Contributors
Updated on 26 Nov 2024
TypeScript (97.6%)
Shell (1.66%)
JavaScript (0.56%)
Dockerfile (0.19%)
Cumulative downloads
Total Downloads
Last day
6.6%
37,445
Compared to previous day
Last week
2.6%
197,615
Compared to previous week
Last month
15.7%
758,892
Compared to previous month
Last year
-1.1%
8,239,261
Compared to previous year
3
3
The firebase-functions-test
is unit testing library for Cloud Functions for Firebase. It is a companion to firebase-functions.
NOTE: This library can only be used with firebase-functions
v3.20.1 or above.
wrap
your Firebase Functions. You can invoke the Firebase Function's handler by invoking the wrap
call.Eg.
1import {myFirebaseFunction} from "../index"; // Your Firebase Functions 2import firebaseFunctionsTest from "firebase-functions-test"; 3 4// Extracting `wrap` out of the lazy-loaded features 5const {wrap} = firebaseFunctionsTest(); 6 7// `jest-ts` example 8test('my unit test', () => { 9 const wrappedFirebaseFunction = wrap(myFirebaseFunction); 10 11 // Invoke the firebase function 12 wrappedFirebaseFunction(); 13 14 // Invoke the firebase function with CloudEvent overrides 15 wrappedFirebaseFunction({data: {arbitrary: 'values'}}); 16});
Learn more about unit testing Cloud Functions here.
To contribute a change, check out the contributing guide.
© Google, 2018. Licensed under The MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 13/29 approved changesets -- score normalized to 4
Reason
SAST tool is not run on all commits -- score normalized to 3
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
61 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More