Open KnisterPeter opened 4 years ago
looks like it is a bug, maybe in jest
, the failureMessages
is supposed to be a [string] (see here), but the actual output contains
"assertionResults": [
{
"ancestorTitles": [],
"failureMessages": [
null
],
"status": "passed",
"title": "ESLint"
}
],
you might want to file an issue at jest to address the root cause. Mean while I think we can make this extension a bit more fault tolerant...
hmmm... another problem when a file being reported multiple times due to jest's projects
config, the result is undetermined, often the last reported result overrides the earlier one, in your example the lint
result overrides the actual jest
test result.
It is not clear which one we should be reporting... try to avoid parsing the test result to "guess" as it is not reliable and certainly won't cover all runners out there... maybe a more robust way is to let the user tell us? The displayName
looked promising, but that info is not currently included in the jest json output file...
Environment
node -v
: v13.12.0npm -v
: 6.14.4npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): jest@24.9.0your vscode-jest settings if customized:
Operating system: Linux and MacOS
Prerequisite
node_modules/.bin/jest
Steps to Reproduce
https://github.com/KnisterPeter/vscode-jest-projects-problem
Relevant Debug Info
Expected Behavior
Have the tests run (works) and indicated in vscode (fails).
Actual Behavior
The test results could not be mapped back into vscode.
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...