chai-also
v0.1.0
Published
Support for accessing parent properties with Chai
Downloads
2
Readme
Chai-Also
Chai plugin to add also
property which accesses the original object
when using property
.
chai.use(require('chai-also'));
var blog = { title: 'JavaScript Ramblings' };
var article = { title: 'First Post', blog: blog };
blog.articles = [article];
article.should
.have.property('blog').that.has.property('title').that.is.a('string')
.and.also
.have.property('articles').that.is.an('array')
.and.also
.have.property('title').that.is.a('string');
License
This project is distributed under the MIT license.