From 8f9e27396cb01c82151225758e41201f3751e3dd Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 16:49:15 +0200 Subject: [PATCH] Removed exposure of require as it led to not working Spectron. --- src/vs/workbench/electron-browser/bootstrap/index.js | 4 ---- test/smoke/src/main.js | 1 - test/smoke/src/spectron/application.ts | 3 +-- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index a094c0daba5..c01da62847a 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -12,10 +12,6 @@ if (window.location.search.indexOf('prof-startup') >= 0) { profiler.startProfiling('renderer', true); } -if (process.env.SMOKE_TEST) { - window.electronRequire = require; // if smoke test, expose require to Spectron to access the core Electron APIs -} - /*global window,document,define*/ const startTimer = require('../../../base/node/startupTimers').startTimer; diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index d9136eed600..acf9db502d2 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -42,7 +42,6 @@ if (parseInt(process.version.substr(1)) < 6) { } // Setting up environment variables -process.env.SMOKE_TEST = 'true'; process.env.VSCODE_LATEST_PATH = program.latest; if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable; process.env.SMOKETEST_REPO = testRepoLocalDir; diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 73e555ffb96..8ccdc2f782c 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -52,8 +52,7 @@ export class SpectronApplication { this.spectron = new Application({ path: electronPath, args: args, - chromeDriverArgs: chromeDriverArgs, - requireName: 'electronRequire' + chromeDriverArgs: chromeDriverArgs }); this.screenshot = new Screenshot(this, testName); this.client = new SpectronClient(this.spectron, this.screenshot);