Merge branch '3.99' into 4.0
This commit is contained in:
@@ -127,5 +127,20 @@ getJasmineRequireObj().util = function(j$) {
|
||||
StopIteration.prototype = Object.create(Error.prototype);
|
||||
StopIteration.prototype.constructor = StopIteration;
|
||||
|
||||
util.validateTimeout = function(timeout, msgPrefix) {
|
||||
// Timeouts are implemented with setTimeout, which only supports a limited
|
||||
// range of values. The limit is unspecified, as is the behavior when it's
|
||||
// exceeded. But on all currently supported JS runtimes, setTimeout calls
|
||||
// the callback immediately when the timeout is greater than 2147483647
|
||||
// (the maximum value of a signed 32 bit integer).
|
||||
var max = 2147483647;
|
||||
|
||||
if (timeout > max) {
|
||||
throw new Error(
|
||||
(msgPrefix || 'Timeout value') + ' cannot be greater than ' + max
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return util;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user