2

The documentation mentions the ability to configure a timeout, but it neglects to mention the default state. I'll try and look at the source code to figure this out to post a helpful answer here shortly.

https://github.com/avajs/ava

wurde
  • 2,487
  • 2
  • 20
  • 39

2 Answers2

4

If the CLI argument --timeout is not supplied then the default is set to conf.timeout, which is extracted via an ava.config.js file (optional). So AVA does NOT have a default timeout without a user explicitly setting it.

https://github.com/avajs/ava/blob/master/lib/cli.js

https://github.com/avajs/ava/blob/master/lib/load-config.js

wurde
  • 2,487
  • 2
  • 20
  • 39
  • Interestingly this came up in our Spectrum chat recently: https://spectrum.chat/ava/general/is-there-any-default-global-timeout-for-tests-in-ava-nothing-found-in-docs~39300859-6795-4e56-8326-224719d72078 — It'd be good to have that added to our documentation. Perhaps you're interested in raising a PR? – Mark Wubben Mar 12 '19 at 09:01
  • Sure. I can take a look and make a suggestion. – wurde Mar 12 '19 at 12:35
  • I appreciate feedback. If my answer was accurate please upvote. – wurde Mar 12 '19 at 14:51
2

The original answer still is informative. However, it appears like there is a default timeout of 10s now according to a a markdown file on AVA's github repo.

Arthur Weborg
  • 8,280
  • 5
  • 30
  • 67