Argument matcher for an array containing at least the specified entries

This commit is contained in:
slackersoft
2013-10-03 18:21:47 -07:00
parent 6354ee17e5
commit b5b77b318a
7 changed files with 106 additions and 2 deletions

View File

@@ -147,6 +147,12 @@ describe("matchersUtil", function() {
expect(j$.matchersUtil.equals(obj, new j$.ObjectContaining({foo: 3}))).toBe(true);
});
it("passes when ArrayContaining is used", function() {
var arr = ["foo", "bar"];
expect(j$.matchersUtil.equals(arr, new j$.ArrayContaining(["bar"]))).toBe(true);
});
it("passes when a custom equality matcher returns true", function() {
var tester = function(a, b) { return true; };