Skip to content

Commit

Permalink
test(oneOf): Add failing tests for contain.oneOf
Browse files Browse the repository at this point in the history
  • Loading branch information
Víctor Oliva committed Mar 12, 2019
1 parent 1cededa commit 5930c01
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
28 changes: 21 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions test/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3274,6 +3274,12 @@ describe('expect', function () {
var threeFour = [3, [4]];
expect(threeFour).to.be.oneOf([1, 2, threeFour]);

expect([1, 2]).to.contain.oneOf([4,2,5]);
expect([3, 4]).to.not.contain.oneOf([2,1,5]);

expect('The quick brown fox jumps over the lazy dog').to.contain.oneOf(['cat', 'dog', 'bird']);
expect('The quick brown fox jumps over the lazy dog').to.not.contain.oneOf(['elephant', 'pigeon', 'lynx']);

err(function () {
expect(1).to.be.oneOf([2, 3], 'blah');
}, "blah: expected 1 to be one of [ 2, 3 ]");
Expand Down

0 comments on commit 5930c01

Please # to comment.