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

Commit

Permalink
Allow specifying global mocha timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben305 committed Aug 16, 2016
1 parent a98d6ab commit 19c89cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'mocha/mocha.js';
// This defines "describe", "it", etc.
mocha.setup({
ui: 'bdd',
timeout: Meteor.settings.public["MOCHA_TIMEOUT"] || 2000,
});

export { mocha };
8 changes: 6 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ function setupGlobals(mocha) {
// can use to ensure they work well with other test driver packages.
const mochaInstance = new Mocha({
ui: 'bdd',
ignoreLeaks: true
ignoreLeaks: true,
timeout: process.env.MOCHA_TIMEOUT || 2000
});
setupGlobals(mochaInstance);


// Pass timeout to client
Meteor.settings.public["MOCHA_TIMEOUT"] = process.env.MOCHA_TIMEOUT || 2000;

export { mochaInstance, setupGlobals, Mocha };

0 comments on commit 19c89cd

Please sign in to comment.