Skip to content

Commit

Permalink
fix: tests (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 authored Apr 5, 2024
1 parent c932816 commit 0018d2d
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.x
- run: npm install
- run: xvfb-run -a npm test
- run: yarn install
- run: xvfb-run -a yarn test
if: runner.os == 'Linux'
- run: npm test
- run: yarn test
if: runner.os != 'Linux'
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
"--extensionTestsPath=${workspaceFolder}/out/test/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"test": "vscode-test",
"package": "vsce package --yarn",
"publish:vsce": "vsce publish --yarn",
"publish:ovsx": "ovsx publish --yarn",
Expand All @@ -363,6 +363,7 @@
"@types/vscode": "1.76.0",
"@typescript-eslint/eslint-plugin": "7.5.0",
"@typescript-eslint/parser": "7.5.0",
"@vscode/test-cli": "^0.0.8",
"@vscode/test-electron": "2.3.9",
"@vscode/vsce": "2.24.0",
"esbuild": "0.20.2",
Expand Down
23 changes: 0 additions & 23 deletions src/test/runTest.ts

This file was deleted.

Loading

0 comments on commit 0018d2d

Please sign in to comment.