chai-contained
v0.0.3
Published
More friendly version of .contain()
Downloads
458
Readme
chai-contained
Usage example:
var chai = require('chai')
, expect = chai.expect
, chaiContained = require('chai-contained');
expect('foo').to.be.containedIn(['foo', 'bar']); // will pass
expect('foo').to.be.containedIn(['noFoo', 'baz']); // will fail
The later will fail with message: AssertionError: expected 'foo' to be one of the [ 'noFoo', 'baz' ]