diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index 39d14c3148e..7d85f302c7d 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -33,6 +33,7 @@ const optimist = require('optimist') .describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec') .describe('reporter-options', 'the mocha reporter options').string('reporter-options').default('reporter-options', '') .describe('wait-server', 'port to connect to and wait before running tests') + .describe('timeout', 'timeout for tests') .describe('tfs').string('tfs') .describe('help', 'show the help').alias('help', 'h'); diff --git a/test/unit/electron/renderer.js b/test/unit/electron/renderer.js index a426deca4fe..afc02f20158 100644 --- a/test/unit/electron/renderer.js +++ b/test/unit/electron/renderer.js @@ -264,6 +264,10 @@ class IPCReporter { } function runTests(opts) { + // this *must* come before loadTests, or it doesn't work. + if (opts.timeout !== undefined) { + mocha.timeout(opts.timeout); + } return loadTests(opts).then(() => {