-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected undefined failure message in output #39
Comments
Yeah, I was worried the parser wouldn't work right on this style. I'll take a look and see what it's doing. Thanks for the report! |
Actually, I'm not sure if my expected result here is the correct one. But that is how I understood the junit5 specification. |
According to junit5 yeah I think you are correct, it should go into message, as far as I know. |
In case of the tap example above, the inputs for the buildFailureParams functions are: {
comments: '',
ok: false,
id: 4,
name: 'README.md',
diag: {
message: '/tmp/lint/README.md 4 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Getting Started"]\\n/tmp/lint/README.md 11 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Build and Test"]\\n/tmp/lint/README.md 17 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Contribute"]'
},
fullname: ''
} Then, on if (fail.diag) {
failObj['@message'] = fail.diag.message || fail.todo
? `${fail.todo}`
: `
---
${formatDiag(fail.diag)}
...`
failObj['@type'] = fail.diag.severity || 'fail'
} it sets the message to fail.todo (which is undefined) if either fail.diag.message or fail.todo exists. I think this can easily be fixed with a if-else if contstruct if you want to have the fail.todo to have preference. |
Yeah, I just have been pretty swamped with work lately, it's also something I wanted to try and do dynamically if possible. But It should be an easy fix. |
We currently have this issue with the version |
v5.0.1 should address this issue now. Once LGTM finishes I'll publish the release. |
5.0.1 released to NPM please re open or open a new ticket if problem persists. |
Describe the bug
The tap output from the markdownlint package looks like it is in the tap spec, however the output of the tool does not pick up the failure message.
To Reproduce
Steps to reproduce the behavior:
npm i -D tap-junit
npx tap-junit --pretty -o output/tests -n output.xml -i .\input.tap
Expected behavior
I expected the comments in the tap file between
---
and...
to be in the<failure message="as in here" type="fail" />
Desktop (please complete the following information):
Additional context
Input example tap
Generated output
Console output:
The text was updated successfully, but these errors were encountered: