rctay / vscode-karma-problem-matcher

Capture errors from Karma tests running in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=rctay.karma-problem-matcher
MIT License
2 stars 2 forks source link

Failed tests not displaying as problems #1

Open DesHorsley opened 5 years ago

DesHorsley commented 5 years ago

I've installed the plugin, created the following task:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Start Live Unit Tests",
            "type": "npm",
            "script": "test",
            "group": "test",
            "isBackground": true,
            "problemMatcher": "$karma-jasmine3"
        }
    ]
}

My angular 7 app is using: "jasmine-core": "~3.3.0" "karma-jasmine": "~2.0.1"

I've tried both $karma-jasmine3 and $karma-jasmine2 and neither seem to display the failing tests in the problem window, any suggestions I should try?

MaulingMonkey commented 5 years ago

"problemMatcher": ["$karma-jasmine2"] would be the "correct" based on your "karma-jasmine": "~2.0.1" AFAIK. Chances are the regular expressions are simply failing to parse something about your build output. I just created https://github.com/rctay/vscode-karma-problem-matcher/pull/2 to fix some issues with ["$karma-jasmine3"] , but that won't fix 2.

If you can share a sample of your Terminal output, it'll hopefully be straightforward to add new test cases and fix the problem. 2 probably has many of the same problems 3 had, but I'd rather not try and blind-fix problems without a real test case.