-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(node/assert): port more test cases from node #16895
Conversation
Updated 4:44 PM PT - Feb 5th, 2025
❌ @DonIsaac, your commit d8f51f6 has 2 failures in
🧪 try this PR locally: bunx bun-pr 16895 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside Bun__deepEquals
when we are checking JSMapType
equality we should have a RETURN_IF_EXCEPTION
check after each Bun__deepEquals
. Same with JSSetType
. The other deep equals calls should be okay as they are because they immediately return on false
Ah, that's now inside |
It looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few suggestions.
nit: the object equality code shouldn't be duplicated. Might be best to split it into template function with bool skipStackProp
, but that can happen in a future pr
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
@dylan-conway feel free to merge this PR whenever you're ready |
What does this PR do?
Ports most remaining
node:assert
unit tests from node.test-assert-calltracker-getCalls
test-assert-calltracker-calls
test-assert-calltracker-report
test-assert-calltracker-verify
test-assert-checktag
test-assert-esm-cjs-message-verify
test-assert-fail
test-assert-if-error
test-assert-deep-with-error
Tests that still need to be ported are:
test-assert-async
test-assert-deep
test-assert-fail-deprecation
test-assert-first-line
test-assert-objects
test-assert-typedarray-deepequal
These require a good deal of refactoring and will be added in another PR.
How did you verify your code works?
There are tests.