ava
ava copied to clipboard
Cap idle timeouts to the maximum possible value
See discussion in https://github.com/avajs/ava/issues/3058. Both the --timeout feature and t.timeout() rely on setTimeout(). In Node.js there is a maximum delay of 2 ** 31 - 1 milliseconds. Any larger value causes Node.js to print a warning and use a 1ms timeout instead.
We should cap the timeouts to the maximum possible value.