Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert: make partialDeepStrictEqual throw when comparing [0] with [-0] #56237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

puskin94
Copy link
Contributor

Fixes: #56230

assert.partialDeepStrictEqual now throws when comparing [0] with [-0]

@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, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.54%. Comparing base (9ec8b9e) to head (cd8e5cd).
Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
lib/assert.js 94.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #56237    +/-   ##
========================================
  Coverage   88.54%   88.54%            
========================================
  Files         657      657            
  Lines      189899   190426   +527     
  Branches    36465    36565   +100     
========================================
+ Hits       168140   168609   +469     
- Misses      14966    15000    +34     
- Partials     6793     6817    +24     
Files with missing lines Coverage Δ
lib/assert.js 99.04% <94.00%> (-0.34%) ⬇️

... and 57 files with indirect coverage changes

@puskin94 puskin94 marked this pull request as draft December 12, 2024 15:03
@puskin94 puskin94 force-pushed the partial-deep-strict-equal-minus-plus-zero branch from 0ce4a4a to 7c30734 Compare December 12, 2024 15:54
@puskin94 puskin94 marked this pull request as ready for review December 12, 2024 15:55
lib/assert.js Outdated Show resolved Hide resolved
@puskin94 puskin94 force-pushed the partial-deep-strict-equal-minus-plus-zero branch 2 times, most recently from 65e1141 to 4fa9ec7 Compare December 12, 2024 19:06
lib/assert.js Outdated Show resolved Hide resolved
lib/assert.js Outdated Show resolved Hide resolved
lib/assert.js Outdated Show resolved Hide resolved
lib/assert.js Outdated Show resolved Hide resolved
lib/assert.js Outdated Show resolved Hide resolved
@puskin94 puskin94 force-pushed the partial-deep-strict-equal-minus-plus-zero branch from 4fa9ec7 to a0d1929 Compare December 12, 2024 19:40
@puskin94
Copy link
Contributor Author

puskin94 commented Dec 12, 2024

@ljharb yep, all valid comments. I spent so much time on this finding the best solution and it took everything out of me, making me write dumb stuff... thanks again 😄

@puskin94 puskin94 force-pushed the partial-deep-strict-equal-minus-plus-zero branch 2 times, most recently from 8f997a5 to 71a5892 Compare December 15, 2024 20:04
@jakecastelli jakecastelli 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 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 19, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros LiviaMedeiros removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 21, 2024
Copy link
Contributor

@LiviaMedeiros LiviaMedeiros left a comment

Choose a reason for hiding this comment

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

LGTM with the following removal.

@puskin94 puskin94 force-pushed the partial-deep-strict-equal-minus-plus-zero branch from 71a5892 to cd8e5cd Compare December 21, 2024 20:52
@LiviaMedeiros LiviaMedeiros 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 22, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 22, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

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

@nodejs-github-bot
Copy link
Collaborator

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

@nodejs-github-bot
Copy link
Collaborator

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. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert.partialDeepStrictEqual not working when comparing [0] and [-0]
7 participants