Skip to content

Conversation

@aduh95
Copy link
Contributor

@aduh95 aduh95 commented Dec 9, 2025

assert.fail communicates the intent better than assert(false) IMO

@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 Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.55%. Comparing base (029ebac) to head (79df8b2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@ ## main #61004 +/- ## ========================================== + Coverage 88.51% 88.55% +0.03%  ========================================== Files 703 703 Lines 208522 208522 Branches 40212 40219 +7 ========================================== + Hits 184564 184647 +83  + Misses 15957 15905 -52  + Partials 8001 7970 -31 
Files with missing lines Coverage Δ
lib/internal/crypto/cipher.js 97.94% <100.00%> (ø)

... and 35 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.
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 9, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 9, 2025
Copy link
Member

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

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

This pattern has actually made its way into lib as well (

assert(false, 'Cannot change encoding');
) – would it be better just to have it as a global rule?

@aduh95 aduh95 changed the title test: enforce use of assert.fail via a lint rule lib,test: enforce use of assert.fail via a lint rule Dec 9, 2025
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 9, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 9, 2025
PR-URL: nodejs#61004 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
@aduh95
Copy link
Contributor Author

aduh95 commented Dec 11, 2025

Landed in 79df8b2

@aduh95 aduh95 merged commit 79df8b2 into nodejs:main Dec 11, 2025
24 of 25 checks passed
@aduh95 aduh95 deleted the assert-fail branch December 11, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

5 participants