Created
June 28, 2013 16:55
-
-
Save ck1125/5886188 to your computer and use it in GitHub Desktop.
matcher for toContainUnordered
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
angular.scenario.matcher("toContainUnordered", function(expected) { | |
var actual = this.future.value; | |
expected.forEach(function(element) { | |
if (actual.indexOf(element) < 0) { | |
throw new Error('Expected ['+actual+'] to contain "'+element+'"'); | |
} | |
}); | |
return true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment