-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: change callTracker.calls and callTracker.callsWith to use an object param instead of positional params #43161
Comments
@nodejs/assert @nodejs/testing |
I'm not super-familiar with this API, but the suggestion for |
I liked it! both calls(options) and callsWith(args, options) 🤩 Should I implement it? |
Should I? 😬 |
I'd say go ahead |
…tional params it changes the callTracker API, its docs and tests that uses this module. This is a breaking change as the calls function was changed Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module. This is a breaking change as the calls function was changed Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module Refs: nodejs#43161
it changes the callTracker API, its docs and tests that use this module Refs: nodejs#43161
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
What is the problem this feature will solve?
I've been implementing some features on the assert module see #43133 and I figured that it's a bit confusing for users to use the signature:
When looking at the intelliSense, it's also confusing because the calls signature is
calls(fn, exact = 1)
however nether fn or exact are required fields so we have to check every positional argument seenode/lib/internal/assert/calltracker.js
Lines 38 to 57 in 71fc444
What is the feature you are proposing to solve the problem?
I'd like to propose that we use object destructuring for those function signatures as it could improve the editor's intelliSense and readability:
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: