Skip to content

Commit 0018d2d

Browse files
authored
fix: tests (#130)
1 parent c932816 commit 0018d2d

File tree

6 files changed

+323
-38
lines changed

6 files changed

+323
-38
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
uses: actions/setup-node@v3
2222
with:
2323
node-version: 20.x
24-
- run: npm install
25-
- run: xvfb-run -a npm test
24+
- run: yarn install
25+
- run: xvfb-run -a yarn test
2626
if: runner.os == 'Linux'
27-
- run: npm test
27+
- run: yarn test
2828
if: runner.os != 'Linux'

.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"request": "launch",
2626
"args": [
2727
"--extensionDevelopmentPath=${workspaceFolder}",
28-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
28+
"--extensionTestsPath=${workspaceFolder}/out/test/index"
2929
],
3030
"outFiles": [
3131
"${workspaceFolder}/out/test/**/*.js"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
"watch": "tsc -watch -p ./",
350350
"pretest": "yarn run compile && yarn run lint",
351351
"lint": "eslint src --ext ts",
352-
"test": "node ./out/test/runTest.js",
352+
"test": "vscode-test",
353353
"package": "vsce package --yarn",
354354
"publish:vsce": "vsce publish --yarn",
355355
"publish:ovsx": "ovsx publish --yarn",
@@ -363,6 +363,7 @@
363363
"@types/vscode": "1.76.0",
364364
"@typescript-eslint/eslint-plugin": "7.5.0",
365365
"@typescript-eslint/parser": "7.5.0",
366+
"@vscode/test-cli": "^0.0.8",
366367
"@vscode/test-electron": "2.3.9",
367368
"@vscode/vsce": "2.24.0",
368369
"esbuild": "0.20.2",

src/test/runTest.ts

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

0 commit comments

Comments
 (0)