mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 17:43:00 -05:00
testing: propoagate timeout option for unit tests
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user