Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: timeout of 1.7976931348623157e+308ms exceeded. #1643

Closed
callumacrae opened this issue Apr 7, 2015 · 4 comments
Closed

Error: timeout of 1.7976931348623157e+308ms exceeded. #1643

callumacrae opened this issue Apr 7, 2015 · 4 comments

Comments

@callumacrae
Copy link
Contributor

I set this.timeout(Number.MAX_VALUE); to see what would happen, and my tests instantly fail with the following error:

Error: timeout of 1.7976931348623157e+308ms exceeded. Ensure the done() callback is being called in this test.

I definitely didn't wait that long

@dasilvacontin
Copy link
Contributor

Too big for setTimeout.

function sayHi () {
  console.log('hi')
}
setTimeout(sayHi, Number.MAX_VALUE)
> hi

Related: http://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values

I don't think it's useful/necessary to support timeouts bigger than 24.8 days, and it's probably a better idea to keep consistency with setTimeout's behavior.

If someone disagrees, please reopen the issue / let me know.

@callumacrae
Copy link
Contributor Author

Ah, that's completely fair enough. It's definitely useless 😄

@boneskull
Copy link
Contributor

perhaps a more relevant exception should be thrown

@dasilvacontin
Copy link
Contributor

@boneskull, that's true, as a reminder of setTimeout's behavior. So that we save them looking into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants