mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Expose require to Spectron if running smoke test.
This commit is contained in:
parent
c80efd221b
commit
4779453977
|
@ -12,6 +12,10 @@ if (window.location.search.indexOf('prof-startup') >= 0) {
|
||||||
profiler.startProfiling('renderer', true);
|
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*/
|
/*global window,document,define*/
|
||||||
|
|
||||||
const startTimer = require('../../../base/node/startupTimers').startTimer;
|
const startTimer = require('../../../base/node/startupTimers').startTimer;
|
||||||
|
|
|
@ -42,6 +42,7 @@ if (parseInt(process.version.substr(1)) < 6) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting up environment variables
|
// Setting up environment variables
|
||||||
|
process.env.SMOKE_TEST = 'true';
|
||||||
process.env.VSCODE_LATEST_PATH = program.latest;
|
process.env.VSCODE_LATEST_PATH = program.latest;
|
||||||
if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable;
|
if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable;
|
||||||
process.env.SMOKETEST_REPO = testRepoLocalDir;
|
process.env.SMOKETEST_REPO = testRepoLocalDir;
|
||||||
|
|
Loading…
Reference in a new issue