Skip to content

Adds Firebase Targaryen rule tester related matchers to Must.js.

License

Notifications You must be signed in to change notification settings

jtwebman/must-targaryen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Adds Firebase Targaryen rule tester related matchers to Must.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published