.vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"args": ["${workspaceFolder}/${relativeFileDirname}/${fileBasenameNoExtension}.spec.ts"],
"command": "scripts/upsert-test.sh",
"group": "test",
"label": "Upsert test for current file",
"presentation": {
"panel": "dedicated",
"reveal": "silent"
},
"problemMatcher": [],
"type": "shell"
},
{
"args": ["run", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Run tests",
"presentation": {
"panel": "dedicated",
"reveal": "always"
},
"problemMatcher": [],
"type": "shell"
},
{
"args": ["--no-coverage", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Watch tests",
"presentation": {
"panel": "dedicated",
"reveal": "always"
},
"problemMatcher": [],
"type": "shell"
},
{
"args": ["--no-coverage", "${relativeFile}"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Watch tests for current .spec.ts file",
"presentation": {
"panel": "dedicated",
"reveal": "always"
},
"problemMatcher": [],
"type": "shell"
}
]
}