From 1857d6c076851807b9409870b4a5d4f06ff208f3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 Aug 2022 13:54:39 +0200 Subject: [PATCH] for test runinng, use `--dev` instead of `--debug` (#159040) fixes https://github.com/microsoft/vscode/issues/159011 --- test/unit/electron/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index e9f75612c7d..60cdcfd4ba3 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -26,7 +26,7 @@ const optimist = require('optimist') .describe('runGlob', 'only run tests matching ').alias('runGlob', 'glob').alias('runGlob', 'runGrep').string('runGlob') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') - .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug') + .describe('dev', 'open dev tools, keep window open, reuse app data').alias('dev', ['dev-tools', 'devTools']).string('dev') .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') @@ -73,7 +73,7 @@ if (crashReporterDirectory) { }); } -if (!argv.debug) { +if (!argv.dev) { app.setPath('userData', path.join(tmpdir(), `vscode-tests-${Date.now()}`)); } @@ -152,7 +152,7 @@ class IPCRunner extends events.EventEmitter { app.on('ready', () => { ipcMain.on('error', (_, err) => { - if (!argv.debug) { + if (!argv.dev) { console.error(err); app.exit(1); } @@ -192,7 +192,7 @@ app.on('ready', () => { }); win.webContents.on('did-finish-load', () => { - if (argv.debug) { + if (argv.dev) { win.show(); win.webContents.openDevTools(); } @@ -270,7 +270,7 @@ app.on('ready', () => { applyReporter(runner, argv); } - if (!argv.debug) { + if (!argv.dev) { ipcMain.on('all done', () => app.exit(runner.didFail ? 1 : 0)); } });