Skip to content

Commit

Permalink
Fix windows CI (#1149)
Browse files Browse the repository at this point in the history
* Experiment with vscode/test-cli package
  • Loading branch information
fendor authored Oct 22, 2024
1 parent 0946ee0 commit 597506e
Show file tree
Hide file tree
Showing 6 changed files with 224 additions and 66 deletions.
15 changes: 15 additions & 0 deletions .vscode-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { defineConfig } = require('@vscode/test-cli');

module.exports = defineConfig([
{
label: 'integration-tests',
files: 'out/test/**/*.test.js',
version: 'stable',
workspaceFolder: './test-workspace',
installExtensions: ['justusadam.language-haskell'],
mocha: {
timeout: 120 * 1000 // 2 minute timeout
}
}
// you can specify additional test configurations, too
]);
3 changes: 1 addition & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
"preLaunchTask": "npm: webpack"
Expand All @@ -18,8 +17,8 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"testConfiguration": "${workspaceFolder}/.vscode-test.js",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
"preLaunchTask": "npm: pretest"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@
"push-tag": "git tag -a $npm_package_version -m \"Version $npm_package_version\" && git push origin $npm_package_version",
"pretest": "tsc --alwaysStrict -p ./",
"format": "prettier . --write",
"test": "node ./out/test/runTest.js"
"test": "vscode-test"
},
"husky": {
"hooks": {
Expand All @@ -1309,6 +1309,7 @@
"@types/which": "^3.0.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"eslint": "^8.57.0",
"eslint-webpack-plugin": "^4.2.0",
Expand Down
55 changes: 0 additions & 55 deletions test/runTest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ suite('Extension Test Suite', () => {
}
return false;
};
assert.ok(await runWithIntervalAndTimeout(checkServerLog, 5, 120),
assert.ok(await runWithIntervalAndTimeout(checkServerLog, 1, 60),
'Extension log file has no expected hls output');
});

Expand Down
Loading

0 comments on commit 597506e

Please sign in to comment.