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

Allow specifying global mocha timeout #9

Open
wants to merge 1 commit into
base: practicalmeteor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 };