Skip to content

Commit

Permalink
test(*): add extra test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cabljac committed Apr 23, 2024
1 parent 1c70a2f commit 81bc12c
Show file tree
Hide file tree
Showing 26 changed files with 14,147 additions and 2,352 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/conditional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ jobs:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: npm i -g firebase-tools@11
command: npm i -g firebase-tools@13

- name: Setup e2e secrets
run: |
echo SMTP_PASSWORD=${{ secrets.SENDGRID_API_KEY }} >> _emulator/extensions/firestore-send-email-sendgrid.secret.local
- run: npm install -g rimraf
- run: cd ${{ matrix.extension }}/functions && npm install
- run: cd ${{ matrix.extension }}/functions && npm run build
- run: node scripts/changeFirebaseJson.cjs ${{ matrix.extension }}
- name: Start Firebase Emulator
run: cd _emulator && firebase emulators:start &
- run:
cd ${{ matrix.extension }}/functions && npm run testIfEmulatorRunning
CI_TEST=true && GOOGLE_CLOUD_PROJECT=demo-test && cd ${{
matrix.extension }}/functions && npm run testIfEmulatorRunning
131 changes: 130 additions & 1 deletion auth-mailchimp-sync/functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion auth-mailchimp-sync/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clean": "rimraf lib",
"compile": "tsc",
"test": "jest",
"testIfEmulatorRunning": "wait-on tcp:4001 && jest",
"generate-readme": "firebase ext:info .. --markdown > ../README.md"
},
"dependencies": {
Expand All @@ -21,7 +22,8 @@
"@types/jest": "29.5.0",
"firebase-functions-test": "^3.2.0",
"jest": "29.5.0",
"ts-jest": "29.1.2"
"ts-jest": "29.1.2",
"wait-on": "^7.2.0"
},
"engines": {
"node": "18"
Expand Down
2 changes: 0 additions & 2 deletions delete-user-data/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const databaseURL = getDatabaseUrl(
config.selectedDatabaseInstance,
config.selectedDatabaseLocation
);
console.log("");

// Initialize the Firebase Admin SDK
admin.initializeApp({
credential: admin.credential.applicationDefault(),
Expand Down
Loading

0 comments on commit 81bc12c

Please sign in to comment.