Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
9 participants
@danielgsims
Copy link
Contributor

commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected 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.

Daniel Sims
test: change var declarations, add mustCall check
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.
@danielgsims

This comment has been minimized.

Copy link
Contributor Author

commented Dec 1, 2016

This is from the code and learn at NINA


process.once('exit', function() {
console.log('runs');

This comment has been minimized.

Copy link
@julianduque

julianduque Dec 1, 2016

Member

Can you please remove this console.log statement here?

This comment has been minimized.

Copy link
@danielgsims

danielgsims Dec 1, 2016

Author Contributor

whoops, sure.

@danielgsims

This comment has been minimized.

Copy link
Contributor Author

commented Dec 1, 2016

@julianduque - all set

@Trott

This comment has been minimized.

Copy link
Member

commented Dec 4, 2016

Thanks for the contribution! If it's not too much trouble, can you switch the occurrences of assert.equal() in the test to assert.strictEqual()?

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) {

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 5, 2016

Contributor

Can't this be const?

@jasnell

jasnell approved these changes Dec 5, 2016

Daniel Sims
test: change let declaration, assertions
I changed the let to a const declaration, and edited the equal
assertions to a strict assertion.
@danielgsims

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2016

Here you go, let me know if there's anything else.

@Trott

This comment has been minimized.

Copy link
Member

commented Dec 22, 2016

Ping @cjihrig: Looks like your comment has been addressed. If so, can you update your review?

@Trott

This comment has been minimized.

Trott added a commit to Trott/io.js that referenced this pull request Dec 23, 2016

test: change var declarations, add mustCall check
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>
@Trott

This comment has been minimized.

Copy link
Member

commented Dec 23, 2016

Landed in 9fd79c9.
Thanks for the contribution! 🎉

If you or anyone else wants a good second commit, this can possibly be further refactored to get rid of the called variable and the process.on('exit', ...) handler by using common.mustCall().

@Trott Trott closed this Dec 23, 2016

@evanlucas evanlucas referenced this pull request Jan 3, 2017

Merged

v7.4.0 release proposal #10589

evanlucas added a commit that referenced this pull request Jan 3, 2017

test: change var declarations, add mustCall check
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>

evanlucas added a commit that referenced this pull request Jan 4, 2017

test: change var declarations, add mustCall check
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>

MylesBorins added a commit that referenced this pull request Jan 23, 2017

test: change var declarations, add mustCall check
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>

MylesBorins added a commit that referenced this pull request Jan 23, 2017

test: change var declarations, add mustCall check
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>

MylesBorins added a commit that referenced this pull request Jan 24, 2017

test: change var declarations, add mustCall check
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>

MylesBorins added a commit that referenced this pull request Jan 24, 2017

test: change var declarations, add mustCall check
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>

This was referenced Jan 24, 2017

MylesBorins added a commit that referenced this pull request Jan 31, 2017

test: change var declarations, add mustCall check
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>

MylesBorins added a commit that referenced this pull request Feb 1, 2017

test: change var declarations, add mustCall check
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.