-
Notifications
You must be signed in to change notification settings - Fork 30k
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: 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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
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