2026-11-03 13:52:28 +00:00
|
|
|
const path = require("node:path");
|
2026-11-03 16:01:24 +00:00
|
|
|
const fs = require("node:fs");
|
2026-11-03 13:52:28 +00:00
|
|
|
const { runTests } = require("@vscode/test-electron");
|
|
|
|
|
|
2026-11-03 16:01:24 +00:00
|
|
|
// Adding the image source folder to an empty or single-folder window restarts the
|
|
|
|
|
// extension host, so tests start in a multi-root workspace with one local folder.
|
|
|
|
|
const root = path.resolve(__dirname, "..");
|
|
|
|
|
const workspaceFile = path.join(root, ".vscode-test", "runa-host.code-workspace");
|
|
|
|
|
fs.mkdirSync(path.dirname(workspaceFile), { recursive: true });
|
|
|
|
|
fs.writeFileSync(
|
|
|
|
|
workspaceFile,
|
|
|
|
|
JSON.stringify({ folders: [{ path: path.join(root, "integration") }] }, null, 2),
|
|
|
|
|
);
|
|
|
|
|
|
2026-11-03 13:52:28 +00:00
|
|
|
runTests({
|
|
|
|
|
version: "1.96.4",
|
|
|
|
|
extensionDevelopmentPath: path.resolve(__dirname, ".."),
|
|
|
|
|
extensionTestsPath: path.resolve(__dirname, "../out/integration/host.js"),
|
|
|
|
|
launchArgs: [
|
2026-11-03 16:01:24 +00:00
|
|
|
workspaceFile,
|
2026-11-03 13:52:28 +00:00
|
|
|
"--disable-gpu",
|
|
|
|
|
"--no-sandbox",
|
|
|
|
|
"--skip-welcome",
|
|
|
|
|
"--disable-extensions",
|
|
|
|
|
"--disable-telemetry",
|
|
|
|
|
],
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.error(error);
|
|
|
|
|
process.exitCode = 1;
|
|
|
|
|
});
|