Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Add file path to xunit reporter #5112

Closed
3 tasks done
JoshuaKGoldberg opened this issue Mar 4, 2024 · 0 comments 路 Fixed by #4985
Closed
3 tasks done

馃殌 Feature: Add file path to xunit reporter #5112

JoshuaKGoldberg opened this issue Mar 4, 2024 · 0 comments 路 Fixed by #4985
Labels
semver-minor implementation requires increase of "minor" version number; "features" status: accepting prs Mocha can use your help with this one! type: feature enhancement proposal

Comments

@JoshuaKGoldberg
Copy link
Member

Feature Request Checklist

Overview

Filing an issue to track #4985: back in #4219, the json, doc, and json-stream reporters were augmented to output the test filenames in addition to their other attributes. But the xunit reporter wasn't given the same addition.

Suggested Solution

#4985, literally. 馃槃

As in: adding file: test.file to the reported attributes.

Alternatives

I can't think of anything. https://github.com/mochajs/mocha/pull/4985/files#r1193989943 suggests using test?.invocationDetails?.absoluteFile as a backup, but neither invocationDetails nor absoluteFile exist in Mocha. I think that's a Cypress-only thing.

Additional Info

Adding a co-author credit as @bmish made two PRs justifying this feature. 鉂わ笍

Co-authored-by: @bmish

@JoshuaKGoldberg JoshuaKGoldberg added type: feature enhancement proposal status: accepting prs Mocha can use your help with this one! semver-minor implementation requires increase of "minor" version number; "features" labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor implementation requires increase of "minor" version number; "features" status: accepting prs Mocha can use your help with this one! type: feature enhancement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant