node icon indicating copy to clipboard operation
node copied to clipboard

assert: fix deepStrictEqual on errors when cause is present

Open geeksilva97 opened this issue 1 year ago • 2 comments

Refs #55310

This PR fixes AssertionError reporting when cause is present.

geeksilva97 avatar Oct 16 '24 16:10 geeksilva97

I tried to follow your suggestion @BridgeAR but doing that after inspection would turn expect and actual into strings which would make the process of removing stack frames, at least for me, complex.

geeksilva97 avatar Oct 19 '24 19:10 geeksilva97

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.43%. Comparing base (5633c62) to head (5ac53d2). Report is 912 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55406      +/-   ##
==========================================
+ Coverage   87.93%   88.43%   +0.50%     
==========================================
  Files         654      654              
  Lines      187686   187697      +11     
  Branches    35819    36131     +312     
==========================================
+ Hits       165038   165991     +953     
+ Misses      15849    14946     -903     
+ Partials     6799     6760      -39     
Files with missing lines Coverage Δ
lib/internal/assert/assertion_error.js 95.27% <100.00%> (+0.13%) :arrow_up:

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

codecov[bot] avatar Oct 19 '24 21:10 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63258/

nodejs-github-bot avatar Oct 22 '24 21:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63323/

nodejs-github-bot avatar Oct 28 '24 13:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63419/

nodejs-github-bot avatar Nov 04 '24 12:11 nodejs-github-bot

Landed in 4da8d110f3930e6f97c203e6a3d031cb583f4ca0

aduh95 avatar Nov 05 '24 23:11 aduh95

This commit does not land cleanly on v22.x-staging and will need manual backport in case we want it in v22.x.

ruyadorno avatar Nov 27 '24 07:11 ruyadorno

I can do that, folks.

EDIT: By the tags, it looks like @aduh95 backported it.

geeksilva97 avatar Nov 27 '24 12:11 geeksilva97