mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
testing: propoagate timeout option for unit tests
This commit is contained in:
parent
8dcc489fa1
commit
24ea8408c3
|
@ -33,6 +33,7 @@ const optimist = require('optimist')
|
||||||
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec')
|
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec')
|
||||||
.describe('reporter-options', 'the mocha reporter options').string('reporter-options').default('reporter-options', '')
|
.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('wait-server', 'port to connect to and wait before running tests')
|
||||||
|
.describe('timeout', 'timeout for tests')
|
||||||
.describe('tfs').string('tfs')
|
.describe('tfs').string('tfs')
|
||||||
.describe('help', 'show the help').alias('help', 'h');
|
.describe('help', 'show the help').alias('help', 'h');
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,10 @@ class IPCReporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
function runTests(opts) {
|
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(() => {
|
return loadTests(opts).then(() => {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue