Skip to content

Commit

Permalink
for test runinng, use --dev instead of --debug (microsoft#159040)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Aug 24, 2022
1 parent e868117 commit 24f12cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions unit/electron/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const optimist = require('optimist')
.describe('runGlob', 'only run tests matching <file_pattern>').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')
Expand Down Expand Up @@ -73,7 +73,7 @@ if (crashReporterDirectory) {
});
}

if (!argv.debug) {
if (!argv.dev) {
app.setPath('userData', path.join(tmpdir(), `vscode-tests-${Date.now()}`));
}

Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -192,7 +192,7 @@ app.on('ready', () => {
});

win.webContents.on('did-finish-load', () => {
if (argv.debug) {
if (argv.dev) {
win.show();
win.webContents.openDevTools();
}
Expand Down Expand Up @@ -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));
}
});

0 comments on commit 24f12cb

Please sign in to comment.