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

remove var and use let and const #9903

Closed
wants to merge 1 commit into from
Closed

Conversation

duylebao
Copy link

@duylebao duylebao commented Dec 1, 2016

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

test

Description of change

remove var and use let and const
remove assert.equals and use assert.strictEqual
new unit test to handle case when requiring invalid path to package.json

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

// should be invalid package path
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you capitalize and punctuate the comment please.

const assert = require('assert');

// should be invalid package path
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use assert.throws().

@duylebao
Copy link
Author

duylebao commented Dec 5, 2016

@cjihrig made the changes as suggested

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

@duylebao
Copy link
Author

duylebao commented Dec 6, 2016

thank you for approving, I don't think I have access to merge the pull request, I assume one of you will be merging this then?

@jasnell
Copy link
Member

jasnell commented Dec 6, 2016

Once one of us has had an opportunity to run it through CI, assuming that comes up good, one of the committers will get it landed. The CI has been worked pretty hard today to I'm saving up a batch of tests for tomorrow.

@fhinkel
Copy link
Member

fhinkel commented Dec 6, 2016

Thanks. LGTM. Can you squash the commits into one and change the commit message, please? It should start with the subsystem, i.e., test:

@jasnell
Copy link
Member

jasnell commented Dec 6, 2016

CI: https://ci.nodejs.org/job/node-test-pull-request/5255/

@duylebao : can you squash the commits in this down to a single commit? ... ha! just saw that @fhinkel had just asked... guess I should refresh before posting :-)

@duylebao
Copy link
Author

duylebao commented Dec 7, 2016

never had to use squash before, tried the following:

git rebase -i HEAD~4
change all the choose to be s
try to save the file
get the following error: Cannot 'squash' without a previous commit

anyone know what's going on?

@cjihrig
Copy link
Contributor

cjihrig commented Dec 7, 2016

You'll want to keep one of the four :-)

remove assert.equal to use assert.strictEqual
new unit test for requiring an invalid package
@duylebao
Copy link
Author

duylebao commented Dec 7, 2016

thanks, commits have been squashed.

@Trott
Copy link
Member

Trott commented Dec 8, 2016

@Trott
Copy link
Member

Trott commented Dec 9, 2016

CI issues unrelated to these changes. Let's run again.

CI: https://ci.nodejs.org/job/node-test-pull-request/5332/

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 21, 2016
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: nodejs#9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 21, 2016
Add test for requiriing an invalid package path.

PR-URL: nodejs#9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Trott pushed a commit to Trott/io.js that referenced this pull request Dec 21, 2016
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: nodejs#9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
@Trott
Copy link
Member

Trott commented Dec 21, 2016

This probably should have been three separate PRs, one for each file (or at least two separate PRs, one for the refactors and one for the new test). So I split it into separate commits.

Landed in 576cf4b, 283321e, and 3c8a3a5.

Thanks for the contribution! 🎉

@Trott Trott closed this Dec 21, 2016
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This was referenced Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* var -> const
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
Add test for requiriing an invalid package path.

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
* var -> const/let
* assert.equal() -> assert.strictEqual()

PR-URL: #9903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@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. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants