Skip to content

Conversation

@BridgeAR
Copy link
Member

Error's cause and errors properties would be visible even if these were not own properties. This is changed to align with all other parts of the inspect handling.

As drive-by I changed an array to a set for faster lookup in assert.

Fixes: #60717
Closes: #60724

Error's cause and errors properties would be visible even if these
were not own properties. This is changed to align with all other
parts of the inspect handling.

As drive-by I changed an array to a set for faster lookup in assert.

Fixes: nodejs#60717
Closes: nodejs#60724
@BridgeAR BridgeAR added util Issues and PRs related to the built-in util module. console Issues and PRs related to the console subsystem. labels Dec 12, 2025
@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run. labels Dec 12, 2025
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (14f02fc) to head (e0f773f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61032      +/-   ##
==========================================
- Coverage   88.52%   88.52%   -0.01%     
==========================================
  Files         703      703              
  Lines      208538   208539       +1     
  Branches    40214    40220       +6     
==========================================
- Hits       184615   184611       -4     
- Misses      15921    15950      +29     
+ Partials     8002     7978      -24     
Files with missing lines Coverage Δ
lib/internal/assert/assertion_error.js 95.94% <100.00%> (+<0.01%) ⬆️
lib/internal/util/inspect.js 99.60% <100.00%> (-0.04%) ⬇️

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

@BridgeAR BridgeAR 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 12, 2025
const kMaxLongStringLength = 512;

const kMethodsWithCustomMessageDiff = ['deepStrictEqual', 'strictEqual', 'partialDeepStrictEqual'];
const kMethodsWithCustomMessageDiff = new SafeSet(['deepStrictEqual', 'strictEqual', 'partialDeepStrictEqual']);
Copy link
Contributor

Choose a reason for hiding this comment

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

That seems unrelated

Copy link
Member Author

Choose a reason for hiding this comment

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

See PR description

Copy link
Contributor

Choose a reason for hiding this comment

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

It should its own PR IMO, as is it makes the git blame harder to use, and so it can be reverted / benchmarked on its own if need be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. console Issues and PRs related to the console subsystem. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

util.inspect throws when given a ZodError

4 participants