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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user