-
Notifications
You must be signed in to change notification settings - Fork 30.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
test: refactor stdin-script-child #10321
Conversation
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value
LGTM if CI is ✅ |
@@ -22,11 +22,11 @@ child.stderr.on('data', function(c) { | |||
}); | |||
|
|||
child.on('close', function(c) { |
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.
Can you please wrap the callback with common.mustCall
?
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.
We need butter better documentation for common.mustCall()
for new contributors. I've just opened #10390 to slightly expand what we have.
@emanuelbuholzer If you need a little bit more information about common.mustCall()
, it's at https://github.com/Trott/io.js/blob/bd2ae52fc3fbb9ce6c0e8c79ff5e67f8a742847b/test/README.md#mustcallfn-expected for now. You can also look at how it is used in other tests. And you can also ask questions here or on the #node-dev channel on Freenode IRC.
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.
+1 for buttery documentation
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.
Yes, I also think it needs some better documentation. I'll add my thoughts and experiences to the opened issue. I just checked the function out in the source code and will try to make the changes in a bit.
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 if CI is ✅
Landed bc57f24 |
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
Thanks for the contribution, @emanuelbuholzer! 🎉 |
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
- var -> const where possible - assert.equal -> assert.strictEqual - passed the setTimeout function a second parameter for readability - used assert.strictEqual for assert(!c) as it is expected to be 0 and not some other value PR-URL: #10321 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesDescription of change
not some other value