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

Conversation

Projects
None yet
9 participants
@duylebao
Copy link

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

@mscdex mscdex added the net label Dec 1, 2016

test/parallel/test-require-invalid-package.js Outdated
require('../common');
const assert = require('assert');

// should be invalid package path

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 3, 2016

Contributor

Can you capitalize and punctuate the comment please.

test/parallel/test-require-invalid-package.js Outdated
const assert = require('assert');

// should be invalid package path
try {

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 3, 2016

Contributor

This should use assert.throws().

@duylebao

This comment has been minimized.

Copy link
Author

commented Dec 5, 2016

@cjihrig made the changes as suggested

@jasnell

jasnell approved these changes Dec 5, 2016

@cjihrig

cjihrig approved these changes Dec 5, 2016

Copy link
Contributor

left a comment

Thanks. LGTM

@duylebao

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2016

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

Duy Le
remove var and use let and const
remove assert.equal to use assert.strictEqual
new unit test for requiring an invalid package

@duylebao duylebao force-pushed the duylebao:master branch to 847e589 Dec 7, 2016

@duylebao

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

thanks, commits have been squashed.

@Trott

This comment has been minimized.

Copy link
Member

commented Dec 8, 2016

@Trott

This comment has been minimized.

Copy link
Member

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 added a commit to Trott/io.js that referenced this pull request Dec 21, 2016

test: refactor test-child-process-kill
* 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 added a commit to Trott/io.js that referenced this pull request Dec 21, 2016

test: add test-require-invalid-package
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 added a commit to Trott/io.js that referenced this pull request Dec 21, 2016

test: refactor test-net-reconnect-error
* 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

This comment has been minimized.

Copy link
Member

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 evanlucas referenced this pull request Jan 3, 2017

Merged

v7.4.0 release proposal #10589

evanlucas added a commit that referenced this pull request Jan 3, 2017

test: refactor test-child-process-kill
* 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 added a commit that referenced this pull request Jan 3, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 3, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 4, 2017

test: refactor test-child-process-kill
* 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 added a commit that referenced this pull request Jan 4, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 4, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 23, 2017

test: refactor test-child-process-kill
* 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 added a commit that referenced this pull request Jan 23, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 23, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 23, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 23, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 24, 2017

test: refactor test-child-process-kill
* 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 added a commit that referenced this pull request Jan 24, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 24, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 24, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 24, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Jan 31, 2017

test: refactor test-child-process-kill
* 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 added a commit that referenced this pull request Jan 31, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Jan 31, 2017

test: refactor test-net-reconnect-error
* 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 added a commit that referenced this pull request Feb 1, 2017

test: add test-require-invalid-package
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 added a commit that referenced this pull request Feb 1, 2017

test: refactor test-net-reconnect-error
* 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
You can’t perform that action at this time.