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: modernize JS and tighten equality checking #8476

Closed
wants to merge 2 commits into from

Conversation

pogilvie
Copy link
Contributor

@pogilvie pogilvie commented Sep 10, 2016

Checklist
  • make -j4 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)
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

Node todo process example with the follow test-net-binary.js changes:

var --> const where applicable

==, assert.equal--> ===, assert.strictEqual for all cases
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Sep 10, 2016
var S = eval(s);
assert.ok(S.charCodeAt(0) == i);
assert.ok(S == String.fromCharCode(i));
const s = '\'\\' + i.toString(8) + '\'';
Copy link
Contributor

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.

@cjihrig
Copy link
Contributor

cjihrig commented Sep 10, 2016

LGTM with a comment.

@Trott
Copy link
Member

Trott commented Sep 10, 2016

Pending CI, LGTM with @cjihrig's comment.

@thefourtheye
Copy link
Contributor

LGTM, with @cjihrig's comment.

@Trott
Copy link
Member

Trott commented Sep 10, 2016

@pogilvie
Copy link
Contributor Author

Please see suggested update. Is this what you're suggesting? thx.

@jasnell
Copy link
Member

jasnell commented Sep 12, 2016

LGTM

1 similar comment
@lpinca
Copy link
Member

lpinca commented Sep 12, 2016

LGTM

Trott pushed a commit that referenced this pull request Sep 13, 2016
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>
@Trott
Copy link
Member

Trott commented Sep 13, 2016

Landed in 759cf17

@Trott Trott closed this Sep 13, 2016
Fishrock123 pushed a commit that referenced this pull request Sep 14, 2016
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>
@MylesBorins
Copy link
Contributor

this is oddly causing failures when backported... seems to be the strict equality. Perhaps there is a bug on v4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants