Skip to content

test: fix lint in dtls tests - #64902

Closed
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-dtls-test-lint
Closed

test: fix lint in dtls tests#64902
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-dtls-test-lint

Conversation

@mcollina

@mcollina mcollina commented Aug 1, 2026

Copy link
Copy Markdown
Member

a7d16a8 introduced destructured uses of assert and fixtures in the dtls tests, which the test lint rules forbid (no-restricted-syntax), so lint-js-and-md is currently failing on main and on every open PR.

Two of the files (test-dtls-alpn.mjs, test-dtls-options.mjs) also called bare strictEqual/throws that were never imported at all — those threw ReferenceError at runtime when the assertions ran.

This uses the assert and fixtures namespaces directly throughout, matching the rest of the test suite.

All 25 test-dtls-* tests pass locally on this branch and make lint-js is clean.

cc @jasnell

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 <hello@matteocollina.com>
@mcollina mcollina added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 1, 2026
@mcollina

mcollina commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Fast-track has been requested by @mcollina. Please 👍 to approve. This fixes lint-js-and-md which is currently failing on main and on every open PR.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @mcollina. Please 👍 to approve.

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (a7d16a8) to head (d55fbaf).
⚠️ Report is 4 commits behind head on main.

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     

see 33 files with indirect coverage changes

🚀 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.

@MikeMcC399 MikeMcC399 added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnell jasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, these didn't show up for me locally when I linted. Wonder if I have something out of sync. Thanks for catching!

@MikeMcC399

Copy link
Copy Markdown
Contributor

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

panva pushed a commit that referenced this pull request Aug 1, 2026
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 <hello@matteocollina.com>
PR-URL: #64902
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@panva

panva commented Aug 1, 2026

Copy link
Copy Markdown
Member

Landed in a46087d

@panva panva closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants