forked from NomicFoundation/hardhat-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runTests.ts
42 lines (37 loc) · 1.11 KB
/
runTests.ts
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
32
33
34
35
36
37
38
39
40
41
42
import * as path from "path";
import { runTests } from "@vscode/test-electron";
(async () => {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(
__dirname,
"..",
"..",
"client"
);
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "e2e", "index");
const folder = path.resolve(__dirname, "..", "..", "test", "e2e");
// Download VS Code, unzip it and run the e2e test
await runTests({
version: "1.70.2",
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: [
folder,
"--disable-extensions",
// https://github.com/microsoft/vscode/issues/115794#issuecomment-774283222
"--force-disable-user-env",
],
extensionTestsEnv: {
VSCODE_NODE_ENV: "development",
},
});
} catch (err) {
// eslint-disable-next-line no-console
console.error("Failed to run tests, err:", err);
process.exitCode = 1;
}
})();