-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
test_runner: add assert.register() API #56434
Conversation
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56434 +/- ##
==========================================
- Coverage 88.53% 88.53% -0.01%
==========================================
Files 657 658 +1
Lines 190761 190807 +46
Branches 36616 36619 +3
==========================================
+ Hits 168899 168939 +40
+ Misses 15048 15044 -4
- Partials 6814 6824 +10
|
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.
LGTM :)
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.
lgtm
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.
LGTM, however I have only one doubt regarding whether it will fix the related issue (#52033).
This commit adds a top level assert.register() API to the test runner. This function allows users to define their own custom assertion functions on the TestContext. Fixes: nodejs#52033
I think this is as close as we will get to that request. This allows assertions to be created that don't throw. IMO it also doesn't make sense to add logic to EDIT: Actually, I think we need to add a |
Commit Queue failed- Loading data for nodejs/node/pull/56434 ✔ Done loading data for nodejs/node/pull/56434 ----------------------------------- PR info ------------------------------------ Title test_runner: add assert.register() API (#56434) Author Colin Ihrig <[email protected]> (@cjihrig) Branch cjihrig:asserts -> nodejs:main Labels semver-minor, author ready, commit-queue-squash, test_runner Commits 2 - test_runner: add assert.register() API - nits Committers 1 - cjihrig <[email protected]> PR-URL: https://github.com/nodejs/node/pull/56434 Fixes: https://github.com/nodejs/node/issues/52033 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Pietro Marchini <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/56434 Fixes: https://github.com/nodejs/node/issues/52033 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Pietro Marchini <[email protected]> -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - test_runner: add assert.register() API ⚠ - nits ℹ This PR was created on Thu, 02 Jan 2025 13:27:50 GMT ✔ Approvals: 3 ✔ - Jacob Smith (@JakobJingleheimer): https://github.com/nodejs/node/pull/56434#pullrequestreview-2528217838 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/56434#pullrequestreview-2528251814 ✔ - Pietro Marchini (@pmarchini): https://github.com/nodejs/node/pull/56434#pullrequestreview-2528681830 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-01-03T23:12:12Z: https://ci.nodejs.org/job/node-test-pull-request/64326/ - Querying data for job/node-test-pull-request/64326/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/12610900600 |
This needs another approval or a re-approval in order to land. |
Landed in 4a7b815 |
This commit adds a top level
assert.register()
API to the test runner. This function allows users to define their own custom assertion functions on the TestContext.Fixes: #52033