test: use test context cleanup hooks in parser issue tests by mcollina · Pull Request #5282 · nodejs/undici (original) (raw)
Conversation
This relates to...
N/A
Rationale
test/parser-issues.js was using bare after() calls even though the file only imports test from node:test. That caused lint failures (no-undef) and made the affected tests fail at runtime with ReferenceError: after is not defined.
Changes
- capture the original test context before wrapping it with
tspl - replace bare
after()calls withctx.after(...)in the affected parser issue tests
Features
N/A
Bug Fixes
- fix cleanup registration in the truncated chunked response parser tests so linting passes and the tests run successfully
Breaking Changes and Deprecations
N/A
Status
- I have read and agreed to the Developer's Certificate of Origin
- Tested
- Benchmarked (optional)
- Documented
- Review ready
- In review
- Merge ready
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (13f6af6) to head (c89d4d0).
⚠️ Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #5282 +/- ##
Coverage 93.26% 93.26%
Files 110 110
Lines 36533 36533
Hits 34071 34071
Misses 2462 2462
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
mcollina deleted the fix/parser-issues-cleanup-hooks branch
Needs rebase, and removal of
afterfrom line 4 in main
Merging without rebase caused a lint failure which was fixed in #5316
I'll mark my comments with "Request changes" in future, so that they're not missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})