Skip to content

Commit

Permalink
feat: discover tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n committed Mar 13, 2022
1 parent 96dbb88 commit c2dfcbf
Show file tree
Hide file tree
Showing 20 changed files with 1,017 additions and 82 deletions.
53 changes: 25 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/samples/basic"
],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"description": "Testing adaptor for vitest",
"version": "0.0.1",
"engines": {
"vscode": "^1.65.0"
"vscode": "^1.59.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:vitest-explorer.helloWorld"
"onCommand:vitest-explorer.configureTest",
"workspaceContains:**/vitest.config.*s",
"workspaceContains:**/vite.config.*s"
],
"main": "./out/extension.js",
"contributes": {
Expand All @@ -31,6 +33,7 @@
"test:pure": "vitest run"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/mocha": "^9.1.0",
"@types/node": "14.x",
Expand All @@ -41,12 +44,16 @@
"eslint": "^8.9.0",
"glob": "^7.2.0",
"mocha": "^9.2.1",
"prettier": "^2.5.1",
"typescript": "^4.5.5",
"vite": "^2.8.6",
"vitest": "^0.6.0"
},
"dependencies": {
"@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0"
"@babel/types": "^7.17.0",
"execa": "^6.1.0",
"fs-extra": "^10.0.1",
"mighty-promise": "^0.0.8"
}
}
15 changes: 15 additions & 0 deletions samples/basic/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "basic",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "vitest run"
},
"author": "",
"license": "ISC",
"devDependencies": {
"vite": "^2.8.6",
"vitest": "^0.6.0"
}
}

0 comments on commit c2dfcbf

Please sign in to comment.