Fix ObjectContaining to match recursively

matchersUtil.equals() does not expect a matcher as its first argument,
so send the "actual" value first and the "expected" value second.
This commit is contained in:
Chris Bandy
2014-03-01 17:01:05 -06:00
parent d7053612f5
commit 47884032ad
2 changed files with 7 additions and 1 deletions

View File

@@ -61,4 +61,10 @@ describe("ObjectContaining", function() {
expect(containing.jasmineToString()).toMatch("<jasmine.objectContaining");
});
it("matches recursively", function() {
var containing = new j$.ObjectContaining({one: new j$.ObjectContaining({two: {}})});
expect(containing.jasmineMatches({one: {two: {}}})).toBe(true);
});
});