test: fix lint in dtls tests - #64902
Conversation
a7d16a8 introduced destructured uses of assert and fixtures, which the test lint rules forbid, plus bare strictEqual/throws calls that were never imported and threw ReferenceError at runtime. Use the assert and fixtures namespaces directly. Signed-off-by: Matteo Collina <[email protected]>
|
Fast-track has been requested by @mcollina. Please 👍 to approve. This fixes |
|
Fast-track has been requested by @mcollina. Please 👍 to approve. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64902 +/- ##
==========================================
+ Coverage 90.13% 90.15% +0.02%
==========================================
Files 746 746
Lines 242893 242893
Branches 45769 45766 -3
==========================================
+ Hits 218935 218985 +50
+ Misses 15444 15390 -54
- Partials 8514 8518 +4 🚀 New features to boost your workflow:
|
jasnell
left a comment
There was a problem hiding this comment.
Weird, these didn't show up for me locally when I linted. Wonder if I have something out of sync. Thanks for catching!
It seems to have been clobbered by #64716 |
a7d16a8 introduced destructured uses of assert and fixtures, which the test lint rules forbid, plus bare strictEqual/throws calls that were never imported and threw ReferenceError at runtime. Use the assert and fixtures namespaces directly. Signed-off-by: Matteo Collina <[email protected]> PR-URL: #64902 Reviewed-By: Mike McCready <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
Landed in a46087d |
a7d16a8 introduced destructured uses of assert and fixtures, which the test lint rules forbid, plus bare strictEqual/throws calls that were never imported and threw ReferenceError at runtime. Use the assert and fixtures namespaces directly. Signed-off-by: Matteo Collina <[email protected]> PR-URL: #64902 Reviewed-By: Mike McCready <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: James M Snell <[email protected]>
a7d16a8 introduced destructured uses of
assertandfixturesin the dtls tests, which the test lint rules forbid (no-restricted-syntax), solint-js-and-mdis currently failing on main and on every open PR.Two of the files (
test-dtls-alpn.mjs,test-dtls-options.mjs) also called barestrictEqual/throwsthat were never imported at all — those threwReferenceErrorat runtime when the assertions ran.This uses the
assertandfixturesnamespaces directly throughout, matching the rest of the test suite.All 25
test-dtls-*tests pass locally on this branch andmake lint-jsis clean.cc @jasnell