Skip to content

Commit 597506e

Browse files
authored
Fix windows CI (#1149)
* Experiment with vscode/test-cli package
1 parent 0946ee0 commit 597506e

File tree

6 files changed

+224
-66
lines changed

6 files changed

+224
-66
lines changed

.vscode-test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { defineConfig } = require('@vscode/test-cli');
2+
3+
module.exports = defineConfig([
4+
{
5+
label: 'integration-tests',
6+
files: 'out/test/**/*.test.js',
7+
version: 'stable',
8+
workspaceFolder: './test-workspace',
9+
installExtensions: ['justusadam.language-haskell'],
10+
mocha: {
11+
timeout: 120 * 1000 // 2 minute timeout
12+
}
13+
}
14+
// you can specify additional test configurations, too
15+
]);

.vscode/launch.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
1010
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11-
"stopOnEntry": false,
1211
"sourceMaps": true,
1312
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
1413
"preLaunchTask": "npm: webpack"
@@ -18,8 +17,8 @@
1817
"type": "extensionHost",
1918
"request": "launch",
2019
"runtimeExecutable": "${execPath}",
20+
"testConfiguration": "${workspaceFolder}/.vscode-test.js",
2121
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test"],
22-
"stopOnEntry": false,
2322
"sourceMaps": true,
2423
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
2524
"preLaunchTask": "npm: pretest"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@
12941294
"push-tag": "git tag -a $npm_package_version -m \"Version $npm_package_version\" && git push origin $npm_package_version",
12951295
"pretest": "tsc --alwaysStrict -p ./",
12961296
"format": "prettier . --write",
1297-
"test": "node ./out/test/runTest.js"
1297+
"test": "vscode-test"
12981298
},
12991299
"husky": {
13001300
"hooks": {
@@ -1309,6 +1309,7 @@
13091309
"@types/which": "^3.0.4",
13101310
"@typescript-eslint/eslint-plugin": "^7.18.0",
13111311
"@typescript-eslint/parser": "^7.18.0",
1312+
"@vscode/test-cli": "^0.0.10",
13121313
"@vscode/test-electron": "^2.4.1",
13131314
"eslint": "^8.57.0",
13141315
"eslint-webpack-plugin": "^4.2.0",

test/runTest.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

test/suite/extension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ suite('Extension Test Suite', () => {
5757
}
5858
return false;
5959
};
60-
assert.ok(await runWithIntervalAndTimeout(checkServerLog, 5, 120),
60+
assert.ok(await runWithIntervalAndTimeout(checkServerLog, 1, 60),
6161
'Extension log file has no expected hls output');
6262
});
6363

0 commit comments

Comments
 (0)