Skip to content

Commit b964ed9

Browse files
authored
eng: fix waitServer not working in unit test debug (microsoft#201334)
Fixes microsoft#182341
1 parent 651391e commit b964ed9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/unit/electron/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const minimist = require('minimist');
3333
* dev: boolean;
3434
* reporter: string;
3535
* 'reporter-options': string;
36-
* 'wait-server': string;
36+
* 'waitServer': string;
3737
* timeout: string;
3838
* 'crash-reporter-directory': string;
3939
* tfs: string;
@@ -43,7 +43,7 @@ const minimist = require('minimist');
4343
* }}
4444
*/
4545
const args = minimist(process.argv.slice(2), {
46-
string: ['grep', 'run', 'runGlob', 'reporter', 'reporter-options', 'wait-server', 'timeout', 'crash-reporter-directory', 'tfs'],
46+
string: ['grep', 'run', 'runGlob', 'reporter', 'reporter-options', 'waitServer', 'timeout', 'crash-reporter-directory', 'tfs'],
4747
boolean: ['build', 'coverage', 'help', 'dev'],
4848
alias: {
4949
'grep': ['g', 'f'],
@@ -69,7 +69,7 @@ Options:
6969
--dev, --dev-tools, --devTools <window> open dev tools, keep window open, reuse app data
7070
--reporter <reporter> the mocha reporter (default: "spec")
7171
--reporter-options <options> the mocha reporter options (default: "")
72-
--wait-server <port> port to connect to and wait before running tests
72+
--waitServer <port> port to connect to and wait before running tests
7373
--timeout <ms> timeout for tests
7474
--crash-reporter-directory <path> crash reporter directory
7575
--tfs <url> TFS server URL
@@ -232,8 +232,8 @@ app.on('ready', () => {
232232
win.webContents.openDevTools();
233233
}
234234

235-
if (args['wait-server']) {
236-
waitForServer(Number(args['wait-server'])).then(sendRun);
235+
if (args.waitServer) {
236+
waitForServer(Number(args.waitServer)).then(sendRun);
237237
} else {
238238
sendRun();
239239
}

0 commit comments

Comments
 (0)