danielstjules / mocha.parallel

Run async mocha specs in parallel
MIT License
197 stars 20 forks source link

Support "this.timeout()" for hooks and test-level #8

Closed andrewwakeling closed 8 years ago

andrewwakeling commented 8 years ago

Mocha supports the following.

Setting the timeout at the test level:

function it(done) {
  this.timeout(0);
}

Settings the timeout for before/after/beforeEach/afterEach hooks:

function before(done) {
  this.timeout(0);
}

It would be great if these features were supported as it allows for better granularity around timeouts and allows tests to fail faster.

danielstjules commented 8 years ago

Sorry, it's not currently possible: https://github.com/danielstjules/mocha.parallel/issues/5#issuecomment-152943025

Related: https://github.com/danielstjules/mocha.parallel/issues/7

andrewwakeling commented 8 years ago

Thanks for the incredibly prompt reply @danielstjules.

danielstjules commented 8 years ago

This should be supported in the latest release :)