-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test: modernize JS and tighten equality checking #8476
Conversation
Node todo process example with the follow test-net-binary.js changes: var --> const where applicable ==, assert.equal--> ===, assert.strictEqual for all cases
var S = eval(s); | ||
assert.ok(S.charCodeAt(0) == i); | ||
assert.ok(S == String.fromCharCode(i)); | ||
const s = '\'\\' + i.toString(8) + '\''; |
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 could probably be made more readable using a template literal.
LGTM with a comment. |
Pending CI, LGTM with @cjihrig's comment. |
LGTM, with @cjihrig's comment. |
Please see suggested update. Is this what you're suggesting? thx. |
LGTM |
1 similar comment
LGTM |
Node todo process example with the follow test-net-binary.js changes: var --> const where applicable ==, assert.equal--> ===, assert.strictEqual for all cases PR-URL: #8476 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in 759cf17 |
Node todo process example with the follow test-net-binary.js changes: var --> const where applicable ==, assert.equal--> ===, assert.strictEqual for all cases PR-URL: #8476 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
this is oddly causing failures when backported... seems to be the strict equality. Perhaps there is a bug on v4.x |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Description of change
Node todo process example with the following test-net-binary.js changes:
var --> const where applicable
==, assert.equal--> ===, assert.strictEqual for all cases