Hello, I have a task set up in npm where I monitor changes in my TypeScript application, compile it, and run tests automatically. My goal is to have Visual Studio Code alert me in the Problems tab whenever a test fails.
Although I've successfully achieved this, I'm facing an issue where even after fixing the code so that the tests pass again, the warning remains in the Problems tab. This can be quite frustrating as it leads to false positives, potentially causing me to overlook actual test failures. I'm curious if there's a way to clear the Problems tab every time my tests are executed?
Below is an excerpt from my tasks.json file:
{
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "silent",
"suppressTaskName": true,
"tasks": [
{
"taskName": "start",
"args": ["start"],
"isBackground": true,
"problemMatcher": {
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": [
// Omitted for brevity
],
"watching": {
"activeOnStart": true,
"beginsPattern": "\\[1\\] Starting 'test'\\.\\.\\.",
"endsPattern": ".*Finished 'test' after.*"
}
}
}
]
}
Thank you for any insights you may provide!