-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: change var declarations, add mustCall check #9962
Conversation
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run.
This is from the code and learn at NINA |
|
||
process.once('exit', function() { | ||
console.log('runs'); |
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 remove this console.log
statement here?
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.
whoops, sure.
@julianduque - all set |
Thanks for the contribution! If it's not too much trouble, can you switch the occurrences of |
function socketConnected() { | ||
if (++cbcalls === 2) | ||
process.send('handle', socket); | ||
} | ||
|
||
var server = net.createServer(function(c) { | ||
process.once('message', function(msg) { | ||
let server = net.createServer(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't this be const
?
I changed the let to a const declaration, and edited the equal assertions to a strict assertion.
Here you go, let me know if there's anything else. |
Ping @cjihrig: Looks like your comment has been addressed. If so, can you update your review? |
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: nodejs#9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 9fd79c9. If you or anyone else wants a good second commit, this can possibly be further refactored to get rid of the |
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In this test, I changed the var declarations to be either a let or a const. For some of the callbacks, I added a mustCall check to ensure that the functions have run. I also changed assert.equal() to assert.strictEqual(). PR-URL: #9962 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
In this test, I changed the var declarations to be either a let or a
const. For some of the callbacks, I added a mustCall check to ensure
that the functions have run.