Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b86aabd

Browse files
committedJan 29, 2025·
Allow running tests against a specific VSIX
1 parent 109919e commit b86aabd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎.vscode-test.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
const { defineConfig } = require("@vscode/test-cli");
1616
const path = require("path");
17+
const { version } = require("./package.json");
1718

1819
const isCIBuild = process.env["CI"] === "1";
1920
const isFastTestRun = process.env["FAST_TEST_RUN"] === "1";
@@ -24,13 +25,18 @@ const isDebugRun = !(process.env["_"] ?? "").endsWith("node_modules/.bin/vscode-
2425
// so tests don't timeout when a breakpoint is hit
2526
const timeout = isDebugRun ? Number.MAX_SAFE_INTEGER : 3000;
2627

28+
const vsixPath = process.env["VSCODE_SWIFT_VSIX"];
29+
2730
module.exports = defineConfig({
2831
tests: [
2932
{
3033
label: "integrationTests",
3134
files: ["dist/test/common.js", "dist/test/integration-tests/**/*.test.js"],
3235
version: process.env["VSCODE_VERSION"] ?? "stable",
3336
workspaceFolder: "./assets/test",
37+
extensionDevelopmentPath: vsixPath
38+
? [`${__dirname}/.vscode-test/extensions/swiftlang.vscode-swift-${version}`]
39+
: undefined,
3440
launchArgs: [
3541
"--disable-updates",
3642
"--disable-crash-reporter",
@@ -53,7 +59,7 @@ module.exports = defineConfig({
5359
},
5460
},
5561
reuseMachineInstall: !isCIBuild,
56-
installExtensions: ["vadimcn.vscode-lldb"],
62+
installExtensions: ["vadimcn.vscode-lldb"].concat(vsixPath ? [vsixPath] : []),
5763
},
5864
{
5965
label: "unitTests",

0 commit comments

Comments
 (0)