toContain works with array-like objects (Arguments, HTMLCollections, etc)
Fix #699
This commit is contained in:
committed by
slackersoft
parent
cf83ae474c
commit
663fbd0cdb
@@ -19,7 +19,12 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return !!haystack && haystack.indexOf(needle) >= 0;
|
||||
if (!haystack) {
|
||||
return false;
|
||||
} else {
|
||||
var indexOf = haystack.indexOf || Array.prototype.indexOf;
|
||||
return indexOf.call(haystack, needle) >= 0;
|
||||
}
|
||||
},
|
||||
|
||||
buildFailureMessage: function() {
|
||||
|
||||
Reference in New Issue
Block a user