Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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');
});
});
```