Search code examples
intern

Intern Promise Timeouts


I am writing some functional tests with Intern and came across the following section of text...

"The test will also fail if the promise is not fulfilled within the timeout of the test (the default is 30 seconds; set this.timeout to change the value)."

at...

https://github.com/theintern/intern/wiki/Writing-Tests-with-Intern#asynchronous-testing

How do I set the promise timeout for functional tests? I have tried calling timeout() directly on the promise but it isn't a valid method.

I have already set the various WD timeout (page load timeout, implicit wait etc...) but I am having issues with promises timing out.


Solution

  • Setting the timeout in my tests via the suggested API's just didn't work. Its far from ideal but I ended up modifying Test.js directly and hard coding in the timeout I wnated. I did notice when looking through the source that there was a comment on the timeout code saying something like // TODO timeouts not working correctly yet