Home

Awesome

Firebase Targaryen Must Assertions

Currently Targaryen only has Chia and Jasimin hooks but I enjoy using Must.js. So I made this little library to help out anyone else that enjoys using must but also uses Firebase.

Installation

npm install must-targaryen --save-dev

Usage

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