Skip to content

Instantly share code, notes, and snippets.

@ck1125
Created June 28, 2013 16:55
Show Gist options
  • Save ck1125/5886188 to your computer and use it in GitHub Desktop.
Save ck1125/5886188 to your computer and use it in GitHub Desktop.
matcher for toContainUnordered
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