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.
package.json
"scripts": {
"test": "jest --env=node --forceExit",
},