Search⌘ K

Test the Default Cloud Function Locally

Explore how to test the default Firebase Cloud Function locally by integrating with the Firebase Emulator Suite. Understand setting up TypeScript configurations, compiling functions, and running the local development environment to simulate real cloud function triggers and responses effectively.

Testing the default cloud function locally

Let’s first integrate a simple Cloud Function with the Firebase Local Emulator Suite to make sure everything works as expected.

Click Run and open services/web/firebase/functions/src/index.ts and comment out the three last lines. This is a very basic HTTPS function that returns a string when it’s called.

We also have to make a small configuration change to services/web/firebase/functions/tsconfig.json. In particular, add the following to the ...