-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.vscode-test.mjs
More file actions
62 lines (59 loc) · 1.81 KB
/
.vscode-test.mjs
File metadata and controls
62 lines (59 loc) · 1.81 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
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* Configuration for @vscode/test-cli.
*
* Defines integration test profiles that run inside a VS Code Extension
* Development Host with the REAL VS Code API. The compiled Mocha test
* suite (dist/test/suite/*.cjs) is discovered by the runner in index.ts.
*
* Run all profiles: npx vscode-test
* Run one profile: npx vscode-test --label noWorkspace
*
* Prerequisites:
* npm run bundle # builds extension + test suite
* npm run bundle:server # bundles MCP server for e2e tests
*/
import { defineConfig } from '@vscode/test-cli';
import { join } from 'path';
import { fileURLToPath } from 'url';
// Use a workspace-local .tmp path for user-data-dir to keep test artifacts
// within the project. On macOS with deep workspace paths this may emit an
// IPC socket length warning (>103 chars) — this is benign and non-blocking.
const extensionRoot = fileURLToPath(new URL('.', import.meta.url));
const userDataDir = join(extensionRoot, '.tmp', 'vsc-ud');
export default defineConfig([
{
label: 'noWorkspace',
files: 'dist/test/suite/*.test.cjs',
version: 'stable',
launchArgs: ['--user-data-dir', userDataDir],
mocha: {
ui: 'tdd',
color: true,
timeout: 60_000,
},
},
{
label: 'singleFolder',
files: 'dist/test/suite/*.test.cjs',
version: 'stable',
workspaceFolder: './test/fixtures/single-folder-workspace',
launchArgs: ['--user-data-dir', userDataDir],
mocha: {
ui: 'tdd',
color: true,
timeout: 60_000,
},
},
{
label: 'multiRoot',
files: 'dist/test/suite/*.test.cjs',
version: 'stable',
workspaceFolder: './test/fixtures/multi-root-workspace/test.code-workspace',
launchArgs: ['--user-data-dir', userDataDir],
mocha: {
ui: 'tdd',
color: true,
timeout: 60_000,
},
},
]);