-
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
test_runner: add SuiteContext
class
#45687
test_runner: add SuiteContext
class
#45687
Conversation
added SuiteContext class to replace object literal Fixes: nodejs#45641 Refs: nodejs#45641 (comment)
SuiteContext
class
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.
Why, though?
To bring consistency with the docs, the docs mention the existence of SuiteContext class and it being the first argument passed to the functions but the actual class didn't exist and the arg list was empty, hence simply added the class here |
Wouldn't fixing the docs be a more reasonable approach? To be clear, I'm not blocking this PR, but I'm skeptical that having a class is what makes the most sense here. |
I guess the only reason I can give is that it was faster to make the change in the code than having to remove all refs in the doc as refed #45641 (comment) here too 😅😅 |
would be happy to go the doc approach too if you think that would be best practice! |
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
I think @aduh95's point is valid. Is this class necessary or useful? |
I think it's useful for matching the other context objects and the existing documentation. |
FWIW I do think its better to change the code than the documentation, since this name dose help understanding the responsibility of this object |
Landed in 8541b3a |
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Will this be merged to 18.x branch? |
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal Fixes: #45641 Refs: #45641 (comment) PR-URL: #45687 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
added SuiteContext class to replace object literal
Fixes: #45641
Refs: #45641 (comment)