question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set 'timeout' globally?

See original GitHub issue

In mocha, we can set global timeout by adding test/mocha.opts file:

--timeout 5000

Is there a way to do this in ember-mocha?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
blimmercommented, May 6, 2016

For those looking to make this work: do this in your tests/test-helper.js file.

import { mocha } from 'mocha';

mocha.setup({
  // customize as needed
  timeout: 5000,
  slow: 1000,
});

@wongpeiyi 's comment was correct, but I had to figure out how to grab mocha from the ES6 import.

@rwjblue or other maintainers, I think we can close this issue.

4reactions
wongpeiyicommented, Apr 19, 2015

I could do this in my test-helper.js

mocha.setup({
  timeout: 10000,
  slow: 2000
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

setTimeout() - Web APIs | MDN
The global setTimeout() method sets a timer which executes a function or specified piece of code once the timer expires.
Read more >
Setting and using a single Global setTimeout? - Stack Overflow
Use a global timeout which all of your other functions derive timing from. This will make everything run faster, and be easier to...
Read more >
How to use setTimeout function in Global - Javascript - Tabnine
global.setTimeout(() => { this.setState({
Read more >
global-timeout
Default. The timeout time is 10 seconds. The system does not play voice prompts for input timeouts and terminates the call after three...
Read more >
Js.Global | ReScript API
Provide bindings to JS global functions in global namespace. ... Identify timeout started by Js.Global.setTimeout ... setTimeout(work, mins * 60 * 1000)) } ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found