fix: emit suite names as TAP comments and use test.title instead of fullTitle#5904
fix: emit suite names as TAP comments and use test.title instead of fullTitle#5904mostafaNazari702 wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5904 +/- ##
==========================================
+ Coverage 89.69% 89.74% +0.05%
==========================================
Files 66 66
Lines 4688 4692 +4
Branches 978 979 +1
==========================================
+ Hits 4205 4211 +6
+ Misses 483 481 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Tricky stuff! I looked over the TAP 13 specification and tried to map it to the changes & tests here. It seems to be good to me. I also asked Sonnet 4.6 to verify things and it's happy too. But I'm not a TAP user myself, so if anybody who actually uses it could weigh in at some point, that'd be nice.
We have to wait for a bit to merge anyway per #2410 (comment), so leaving this open but approved. Thanks & nice job! 👏
There was a problem hiding this comment.
[Non-Actionable] Just noting that this is TAP 12/13's informal convention of # SuiteName. TAP 14 is a whole other thing that Mocha's reporter doesn't try to support (yet?). This is fine.
PR Checklist
status: accepting prsOverview
So before, the TAP reporter was using test.fullTitle(), which basically stuffed the whole suite hierarchy into every single test name.
That made things kinda messy, and tools like tap-spec couldn’t really understand the structure properly. Everything just looked flat with long names.
Now it’s a bit smarter about it. When a suite starts, it prints the suite name as a comment line (kind of like how tape does it), and then each test just uses test.title. So instead of repeating the whole hierarchy over and over, you actually see the structure from those comment lines. Way cleaner and easier to follow.