The project is based on https://github.com/firebase/emulators-codelab which is used by the following Google codelabs.
- Getting started with the Firebase Local Emulator Suite
- Test-drive Firestore Security Rules
- Test-drive Complex Firebase Functions
{
"projects": {
"default": "your real Firebase Project ID"
}
}
const PROJECT_ID = "your real Firebase Project ID";
module.exports = {
PROJECT_ID,
};
npm install
cd functions
npm install
- Run emulator:start script in package.json
- Run test - functions script in functions/package.json
- Open the
jest-tests
folder in another instance of vscode. This will allow the use of thevscode-jest
extension for working with the tests. - Initially Jest will be stopped.
View > Command Pallete > Jest: Start Ruuner
will start Jest. - The emulator needs to be running for the the tests to pass:
emulators:start