Created
June 18, 2016 21:30
-
-
Save awendland/f42645abb14b724981e3d860471055e0 to your computer and use it in GitHub Desktop.
Chai unordered array equality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const expect = require('chai').expect; | |
const arr = ['email', 'password']; | |
expect(arr).to.have.members(['email', 'password']); // true | |
expect(arr).to.have.members(['email']); // false | |
expect(arr).to.have.members(['email', 'password','extra']); //false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment