Skip to content

Commit d12cdbe

Browse files
authored
Merge pull request #1664 from github/koesie10/upgrade-vscode-test
Upgrade from vscode-test to @vscode/test-electron
2 parents 1ec3d04 + 123219a commit d12cdbe

File tree

6 files changed

+61
-64
lines changed

6 files changed

+61
-64
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 54 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,7 @@
13541354
"@types/xml2js": "~0.4.4",
13551355
"@typescript-eslint/eslint-plugin": "^4.26.0",
13561356
"@typescript-eslint/parser": "^4.26.0",
1357+
"@vscode/test-electron": "^2.2.0",
13571358
"ajv": "^8.11.0",
13581359
"ansi-colors": "^4.1.1",
13591360
"applicationinsights": "^2.3.5",
@@ -1395,7 +1396,6 @@
13951396
"typescript": "^4.5.5",
13961397
"typescript-formatter": "^7.2.2",
13971398
"vsce": "^2.7.0",
1398-
"vscode-test": "^1.4.0",
13991399
"webpack": "^5.62.2",
14001400
"webpack-cli": "^4.6.0"
14011401
},

extensions/ql-vscode/src/vscode-tests/cli-integration/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import { runTestsInDirectory } from '../index-template';
43
import 'mocha';
54
import * as sinonChai from 'sinon-chai';

extensions/ql-vscode/src/vscode-tests/minimal-workspace/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import * as sinonChai from 'sinon-chai';
43
import * as chai from 'chai';
54
import 'chai/register-should';

extensions/ql-vscode/src/vscode-tests/no-workspace/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import * as sinonChai from 'sinon-chai';
43
import * as chai from 'chai';
54
import * as chaiAsPromised from 'chai-as-promised';

extensions/ql-vscode/src/vscode-tests/run-integration-tests.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import * as cp from 'child_process';
44
import {
55
runTests,
66
downloadAndUnzipVSCode,
7-
resolveCliPathFromVSCodeExecutablePath
8-
} from 'vscode-test';
7+
resolveCliArgsFromVSCodeExecutablePath
8+
} from '@vscode/test-electron';
99
import { assertNever } from '../pure/helpers-pure';
1010
import * as tmp from 'tmp-promise';
1111

1212
// For some reason, the following are not exported directly from `vscode-test`,
1313
// but we can be tricky and import directly from the out file.
14-
import { TestOptions } from 'vscode-test/out/runTest';
14+
import { TestOptions } from '@vscode/test-electron/out/runTest';
1515

1616
// For CI purposes we want to leave this at 'stable' to catch any bugs
1717
// that might show up with new vscode versions released, even though
@@ -75,10 +75,11 @@ async function main() {
7575
const extensionTestsEnv: Record<string, string> = {};
7676
if (dirs.includes(TestDir.CliIntegration)) {
7777
console.log('Installing required extensions');
78-
const cliPath = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath);
78+
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
7979
cp.spawnSync(
80-
cliPath,
80+
cli,
8181
[
82+
...args,
8283
'--install-extension',
8384
'hbenl.vscode-test-explorer',
8485
'--install-extension',

0 commit comments

Comments
 (0)