chai-also

0.1.0 • Public • Published

Chai-Also

NPM version Build status Code Climate Coverage Status Dependencies devDependencies

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.

Package Sidebar

Install

npm i chai-also

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • wbyoung