| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Let's try writing some simple tests for our security rules.
Run npm install from this directory, and make sure that you have a recent version of the Firebase CLI tool installed (you'll need firebase --version to be at least 6.1.1).
Download the database emulator
firebase setup:emulators:database
Start the database emulator (and leave it running during the tests)
firebase serve --only database
To run the tests, execute
npm test
which runs all the tests in the tests/ directory.
profile read rules
✓ should allow anyone to read profiles
✓ should only allow users to modify their own profiles
room creation
✓ should require the user creating a room to be its owner
room members
✓ must be added by the room owner
4 passing
| Back | FazBrowse Home | New Git URL |