toContain works with array-like objects (Arguments, HTMLCollections, etc)
Fix #699
This commit is contained in:
committed by
slackersoft
parent
cf83ae474c
commit
663fbd0cdb
@@ -207,6 +207,15 @@ describe("matchersUtil", function() {
|
||||
it("fails when actual is null", function() {
|
||||
expect(j$.matchersUtil.contains(null, 'A')).toBe(false);
|
||||
});
|
||||
|
||||
it("passes with array-like objects", function() {
|
||||
var capturedArgs = null;
|
||||
function testFunction(){
|
||||
capturedArgs = arguments;
|
||||
}
|
||||
testFunction('foo', 'bar');
|
||||
expect(j$.matchersUtil.contains(capturedArgs, 'bar')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildMessage", function() {
|
||||
|
||||
Reference in New Issue
Block a user