You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.throws(function(){s.repeat(-1);},RangeError,"negative repeat counts are out of range","String.prototype.repeat: argument out of range");
272
273
assert.throws(function(){s.repeat(-Infinity);},RangeError,"negative infinite repeat count is out of range","String.prototype.repeat: argument out of range");
273
274
assert.throws(function(){s.repeat(Infinity);},RangeError,"infinite repeat count is out of range","String.prototype.repeat: argument out of range");
275
+
assert.throws(function(){s.repeat(2**30);},RangeError,"lengths too large for a string throw");
274
276
275
277
assert.areEqual("\0\0\0\0","\0".repeat(4),"null character embedded in string is repeated");
276
278
assert.areEqual("a\0ba\0ba\0b","a\0b".repeat(3),"null character embedded in string mixed with normal characters is repeated");
0 commit comments