Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtwebman/must-targaryen
Adds Firebase Targaryen rule tester related matchers to Must.js.
https://github.com/jtwebman/must-targaryen
Last synced: 11 days ago
JSON representation
Adds Firebase Targaryen rule tester related matchers to Must.js.
- Host: GitHub
- URL: https://github.com/jtwebman/must-targaryen
- Owner: jtwebman
- License: mit
- Created: 2015-11-03T20:06:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-10T18:39:11.000Z (almost 8 years ago)
- Last Synced: 2024-09-29T23:12:30.137Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Firebase Targaryen Must Assertions
Currently [Targaryen](https://github.com/goldibex/targaryen) only has
[Chia](http://chaijs.com/) and [Jasimin](http://jasmine.github.io/) hooks but
I enjoy using [Must.js](https://github.com/moll/js-must). So I made this little
library to help out anyone else that enjoys using must but also uses Firebase.## Installation
```bash
npm install must-targaryen --save-dev
```## Usage
```javascript
var expect = require('must');
var mustTargaryen = require('must-targaryen');
mustTargaryen(expect);describe('my tests', function() {
it('test', function() {mustTargaryen.setFirebaseRules({ rules: {
'.read': 'auth != null'
}});mustTargaryen.setFirebaseData({
users: {}
});expect(mustTargaryen.users.unauthenticated).cannot.read.path('/users');
});
});
```