-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Conversation
var common = require('../common'); | ||
var assert = require('assert'); | ||
const common = require('../common'); | ||
const assert = require('assert'); |
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.
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'), |
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.
I think these lines should be indented now.
|
||
var server = tls.createServer(options, function(c) { | ||
const server = tls.createServer(options, common.mustCall(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.
The common.mustCall()
here seems unnecessary.
|
||
process.on('exit', function() { | ||
|
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.
Please remove the unnecessary added blank lines.
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()
@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! |
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: nodejs#10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 6281a1c. |
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let / const added common.mustCall() to callback assert.equal() -> assert.strictEqual() PR-URL: #10017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
var -> let / const
added common.mustCall to callbacks