Skip to content

Commit d64e27d

Browse files
authored
Add UserSettings.schema.json file support and bump to 0.6.0 (#362)
1 parent cc03daf commit d64e27d

24 files changed

+1688
-2285
lines changed

.vscode-test.mjs

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1-
import { defineConfig } from '@vscode/test-cli';
1+
import { defineConfig } from "@vscode/test-cli";
22

33
export default defineConfig({
4-
files: 'out/src/test/**/*.test.js',
4+
files: "out/src/test/suite/**/*.test.js",
5+
workspaceFolder: "./src/test/testFixture",
6+
extensionDevelopmentPath: "./",
7+
installExtensions: ["PowerQuery.vscode-powerquery"],
8+
useInstallation: {
9+
fromMachine: false, // Don't use extensions from the machine - creates clean environment
10+
},
11+
launchArgs: [
12+
// Enable only the specific extensions we need for testing
13+
"--enable-proposed-api=PowerQuery.vscode-powerquery-sdk",
14+
"--enable-proposed-api=PowerQuery.vscode-powerquery",
15+
// Disable some common extensions that might interfere with tests
16+
"--disable-extension=ms-python.python",
17+
"--disable-extension=ms-python.vscode-pylance",
18+
"--disable-extension=ms-vsliveshare.vsliveshare",
19+
"--disable-extension=github.copilot",
20+
"--disable-extension=github.copilot-chat",
21+
],
22+
env: {
23+
NODE_ENV: "test",
24+
},
25+
mocha: {
26+
timeout: 60000, // Increase timeout to allow for extension installation
27+
retries: 1, // Retry failed tests once in case of timing issues
28+
},
529
});

.vscode/launch.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,9 @@
3636
"name": "Extension UI Tests",
3737
"type": "extensionHost",
3838
"request": "launch",
39-
"runtimeExecutable": "${execPath}",
40-
"args": [
41-
"--extensionDevelopmentPath=${workspaceFolder}",
42-
"--extensionTestsPath=${workspaceFolder}/out/src/test/suite/index",
43-
"--extensions-dir=${workspaceFolder}/.vscode-test/extensions"
44-
],
45-
"outFiles": ["${workspaceFolder}/out/**/*.js"],
46-
"preLaunchTask": "tasks: watch-tests"
39+
"testConfiguration": "${workspaceFolder}/.vscode-test.mjs",
40+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
41+
"preLaunchTask": "npm: compile-tests"
4742
}
4843
]
4944
}

.vscode/tasks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@
6969
"label": "tasks: watch-tests",
7070
"dependsOn": ["Watch_VSC_PQ_SDK", "Dev_PQTest_Result_WebView", "npm: watch-tests"],
7171
"problemMatcher": []
72+
},
73+
{
74+
"label": "Run Extension Tests",
75+
"type": "npm",
76+
"script": "test:e2e",
77+
"group": "test",
78+
"presentation": {
79+
"echo": true,
80+
"reveal": "always",
81+
"focus": false,
82+
"panel": "shared"
83+
},
84+
"problemMatcher": []
7285
}
7386
]
7487
}

0 commit comments

Comments
 (0)