-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy path.vscode-test.mjs
More file actions
90 lines (88 loc) · 2.88 KB
/
.vscode-test.mjs
File metadata and controls
90 lines (88 loc) · 2.88 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { defineConfig } from '@vscode/test-cli';
import * as path from 'path';
// Explicit user data directory - ensures VS Code reads our settings.json
const userDataDir = path.resolve('.vscode-test/user-data');
export default defineConfig([
{
label: 'smokeTests',
files: 'out/test/smoke/**/*.smoke.test.js',
mocha: {
ui: 'tdd',
timeout: 120000,
},
env: {
VSC_PYTHON_SMOKE_TEST: '1',
},
launchArgs: [
`--user-data-dir=${userDataDir}`,
// Don't open any folder with Python files to prevent premature activation
'--disable-workspace-trust',
],
// NOTE: Do NOT install ms-python.python for smoke tests!
// It defines python.useEnvironmentsExtension=false by default, which
// causes our extension to skip activation. Smoke tests only verify
// our extension works - we don't need the Python extension.
},
{
label: 'e2eTests',
files: 'out/test/e2e/**/*.e2e.test.js',
mocha: {
ui: 'tdd',
timeout: 180000,
},
env: {
VSC_PYTHON_E2E_TEST: '1',
},
launchArgs: [
`--user-data-dir=${userDataDir}`,
'--disable-workspace-trust',
],
// ms-python.python is installed via CLI flag (--install-extensions) for
// the native Python tools (pet binary). We use inspect() for
// useEnvironmentsExtension check, so Python extension's default is ignored.
},
{
label: 'integrationTests',
files: 'out/test/integration/*.integration.test.js',
workspaceFolder: 'src/test/integration/test-workspace/project-a',
mocha: {
ui: 'tdd',
timeout: 60000,
},
env: {
VSC_PYTHON_INTEGRATION_TEST: '1',
},
launchArgs: [
`--user-data-dir=${userDataDir}`,
'--disable-workspace-trust',
],
// ms-python.python is installed via CLI flag (--install-extensions) for
// the native Python tools (pet binary). We use inspect() for
// useEnvironmentsExtension check, so Python extension's default is ignored.
},
{
label: 'integrationTestsMultiRoot',
files: 'out/test/integration/multiroot/*.integration.test.js',
workspaceFolder: 'src/test/integration/test-workspace/integration-tests.code-workspace',
mocha: {
ui: 'tdd',
timeout: 60000,
retries: 1,
},
env: {
VSC_PYTHON_INTEGRATION_TEST: '1',
},
launchArgs: [
`--user-data-dir=${userDataDir}`,
'--disable-workspace-trust',
],
},
{
label: 'extensionTests',
files: 'out/test/**/*.test.js',
mocha: {
ui: 'tdd',
timeout: 60000,
},
},
]);