Unit Testing Test security rules with Node.js

This lesson is available for PRO members or as a single course purchase. Sign-in and choose a plan below.
Get Unlimited PRO Access


*Enrollment provides full access to this course (and updates) for life.

Create the files test/rules.test.js and test/helpers.js.

Install Jest and the Firebase Testing Package.

command line
npm install --save-dev jest @firebase/rules-unit-testing firebase-admin

Add the following script.

file_type_npm package.json
  "scripts": {
    "test": "jest --env=node --forceExit",


Ask questions via GitHub below OR chat on Slack #questions