-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunTest.js
More file actions
31 lines (26 loc) · 954 Bytes
/
Copy pathrunTest.js
File metadata and controls
31 lines (26 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
// In-editor smoke harness driver for #139.
//
// Downloads a pinned VS Code, launches it with this extension folder loaded
// via --extensionDevelopmentPath, and runs the Mocha suite at suite/index.js
// inside the extension host. Plain JavaScript (not TypeScript): the VS Code
// test runner is Node-native and unavoidable; an exemption is recorded in
// CLAUDE.md under "Runtime Exemptions".
"use strict";
const path = require("path");
const { runTests } = require("@vscode/test-electron");
async function main() {
const extensionDevelopmentPath = path.resolve(__dirname, "..");
const extensionTestsPath = path.resolve(__dirname, "suite", "index.js");
try {
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: ["--disable-extensions"],
});
} catch (err) {
console.error("Smoke run failed:", err);
process.exit(1);
}
}
main();