-
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: clarify role of domains in microtask queue tests #4474
Conversation
Requiring domains calls So these tests test the Thus I would think we don't want to remove them. |
+1 to @misterdjules comments. However, it might be a good idea to add some comments into the test files themselves that explain so that the |
Would it be OK to change the relevant lines from this:
To just this?:
(Along with adding a comment per @jasnell.) If so, I'll go ahead and do that (unless someone else is very motivated to do it). |
5505f68
to
a1316d8
Compare
Rebased, updated, force pushed, changed description and title here. PTAL. |
LGTM |
@@ -1,7 +1,16 @@ | |||
'use strict'; | |||
require('../common'); | |||
var assert = require('assert'); | |||
var domain = require('domain'); | |||
|
|||
// Requiring domain calls _setupDomainUse which in turns changes the |
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.
Not very important, but just an observation: I would remove the calls _setupDomainUse part
and just keep the changes the function that is used to call callbacks...
. The reason is that that much details is not needed, and it would make the comment depend too much on implementation.
I would personally rephrase it to something like:
It depends a bit less on implementation details while still being explicit and clear. But I'm also fine with the existing comments, as long as the typo that I mentioned in an inline comment is fixed. |
@misterdjules Updated with your definitely-better suggested text. Thanks. |
The two commits will need to be squashed into one. The commit message can probably be shorter and just mention that a comment was added to make the purpose of these tests clearer. I don't think we need to quote the whole comment. Other than that, LGTM. Thank you very much for doing that! |
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: nodejs#4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: nodejs#4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Landed in b16a50d |
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: nodejs#4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: #4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: #4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Add a comment to clarify how the tests work and their purpose. Also removes unnecessary assignment of domain module to a variable. PR-URL: nodejs#4474 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Julien Gilli <[email protected]>
Add this comment:
Also removes unnecessary assignment of domain module to a variable.
R: @misterdjules
R: @jasnell