Merge pull request #155 from gkalpak/fix-test-use-correct-version
fix(test): fix looking up or downloading the specified VSCode version
This commit is contained in:
Коммит
b38bba39d8
8
bin/test
8
bin/test
|
@ -6,10 +6,10 @@ const fs = require('fs');
|
|||
|
||||
const downloadAndUnzipVSCode = require('vscode-test').downloadAndUnzipVSCode;
|
||||
|
||||
const version = process.env.CODE_VERSION || '*';
|
||||
const version = process.env.CODE_VERSION || '<latest>';
|
||||
const isInsiders = version === 'insiders';
|
||||
|
||||
const testRunFolder = path.join('.vscode-test', isInsiders ? 'insiders' : 'stable');
|
||||
const testRunFolder = path.join('.vscode-test', isInsiders ? 'insiders' : `vscode-${version}`);
|
||||
const testRunFolderAbsolute = path.join(process.cwd(), testRunFolder);
|
||||
|
||||
let windowsExecutable;
|
||||
|
@ -91,7 +91,9 @@ function runTests() {
|
|||
function downloadExecutableAndRunTests() {
|
||||
console.log('Downloading VS Code into "' + testRunFolderAbsolute);
|
||||
|
||||
downloadAndUnzipVSCode().then(executablePath => {
|
||||
var targetVersion = (version === '<latest>') ? undefined : version;
|
||||
|
||||
downloadAndUnzipVSCode(targetVersion).then(executablePath => {
|
||||
executable = executablePath
|
||||
runTests()
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче