Removed exposure of require as it led to not working Spectron.

This commit is contained in:
Michel Kaporin 2017-06-15 16:49:15 +02:00
parent e4601b2af0
commit 8f9e27396c
3 changed files with 1 additions and 7 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);