-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vscode-test.mjs
More file actions
49 lines (44 loc) · 1.59 KB
/
.vscode-test.mjs
File metadata and controls
49 lines (44 loc) · 1.59 KB
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
43
44
45
46
47
48
49
// import { execSync } from 'node:child_process';
import { existsSync, rmSync } from "node:fs";
import { dirname, resolve } from "node:path";
// import process from 'node:process';
import { fileURLToPath } from "node:url";
import { defineConfig } from "@vscode/test-cli";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Clear user data directory before tests to prevent cached workspace state
const userDataDir = resolve(__dirname, ".vscode-test/user-data");
if (existsSync(userDataDir)) {
rmSync(userDataDir, { recursive: true, force: true });
}
export default defineConfig({
files: "src/test/**/*.test.ts",
version: "stable", // Match the parent VS Code version
mocha: {
ui: "bdd",
timeout: 30000,
parallel: false,
require: ["esbuild-register"],
bail: true,
},
// Allow extensions to load; we install required ones below via the 'extensions' field.
// Run with a temporary profile for isolation between test runs.
launchArgs: [
resolve(__dirname, "test-workspace", "test-workspace.code-workspace"),
// '--profile-temp',
"--disable-workspace-trust",
"--skip-welcome",
"--skip-release-notes",
"--disable-extensions",
"--enable-proposed-api",
"dkattan.copilot-breakpoint-debugger",
],
// Request automatic installation of required marketplace extensions for tests.
// @vscode/test-cli will ensure these are present before running.
// extensions: ['ms-vscode.powershell'],
coverage: {
reporter: ["text", "html", "lcov"],
exclude: ["src/test/**", "**/node_modules/**"],
},
timeout: 30000,
});