Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

How to set custom mocha-options (like timeout)? #83

Open
thebarty opened this issue Mar 23, 2017 · 5 comments
Open

How to set custom mocha-options (like timeout)? #83

thebarty opened this issue Mar 23, 2017 · 5 comments

Comments

@thebarty
Copy link

Hi guys,

a stupid question: how do I set custom mocha options? I'd like to increase standard timeout to 5000?

@FrenchMajesty
Copy link

FrenchMajesty commented Sep 26, 2017

@thebarty You can do it like this:

it('can download a picture',function() {
    this.timeout(5000);
    // run your test...
});

@romainkoenig
Copy link

@FrenchMajesty
Sadly I got this, do you know if there is another way ?
Error: _this.timeout is not a function

@fumbleforce
Copy link

@romainkoenig Are you using arrow functions in describe and it? Won't work if you have those.

@romainkoenig
Copy link

yes it was this, I found out after but forgot to respond to myself here

@FrenchMajesty
Copy link

FrenchMajesty commented Oct 2, 2017 via email

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

No branches or pull requests

4 participants