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: refactor test and add common.mustCall #10017

Closed
wants to merge 1 commit into from
Closed

test: refactor test and add common.mustCall #10017

wants to merge 1 commit into from

Conversation

bchirgwin
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

var -> let / const
added common.mustCall to callbacks

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Dec 1, 2016
@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. tls Issues and PRs related to the tls subsystem. and removed tls Issues and PRs related to the tls subsystem. labels Dec 1, 2016
var common = require('../common');
var assert = require('assert');
const common = require('../common');
const assert = require('assert');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be moved below the common.hasCrypto check.

var dir = common.fixturesDir;
var options = { key: fs.readFileSync(dir + '/test_key.pem'),
const dir = common.fixturesDir;
const options = { key: fs.readFileSync(dir + '/test_key.pem'),
cert: fs.readFileSync(dir + '/test_cert.pem'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these lines should be indented now.


var server = tls.createServer(options, function(c) {
const server = tls.createServer(options, common.mustCall(function(c) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common.mustCall() here seems unnecessary.


process.on('exit', function() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unnecessary added blank lines.

@Trott
Copy link
Member

Trott commented Dec 22, 2016

Ping @bchirgwin: Are you able to update this based on the comments from @cjihrig?

var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()
@Trott
Copy link
Member

Trott commented Dec 24, 2016

@cjihrig I updated this per your comments and pushed to @bchirgwin's branch. Can you please take a look and, if appropriate, update your review? Thanks!

@Trott
Copy link
Member

Trott commented Dec 24, 2016

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 24, 2016
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: nodejs#10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott
Copy link
Member

Trott commented Dec 24, 2016

Landed in 6281a1c.
Thanks for the contribution! 🎉

@Trott Trott closed this Dec 24, 2016
targos pushed a commit that referenced this pull request Dec 26, 2016
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 27, 2016
targos pushed a commit that referenced this pull request Dec 28, 2016
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
var -> let / const
added common.mustCall() to callback
assert.equal() -> assert.strictEqual()

PR-URL: #10017
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
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants