Merge branch 'main' into 3.99

This commit is contained in:
Steve Gravrock
2021-09-23 15:49:47 -07:00
14 changed files with 226 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
getJasmineRequireObj().StringContaining = function(j$) {
function StringContaining(expected) {
if (!j$.isString_(expected)) {
throw new Error('Expected is not a String');
}
this.expected = expected;
}
StringContaining.prototype.asymmetricMatch = function(other) {
if (!j$.isString_(other)) {
// Arrays, etc. don't match no matter what their indexOf returns.
return false;
}
return other.indexOf(this.expected) !== -1;
};
StringContaining.prototype.jasmineToString = function() {
return '<jasmine.stringContaining("' + this.expected + '")>';
};
return StringContaining;
};