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: minor fixes to test-module-loading.js #12728

Closed
wants to merge 1 commit into from

Conversation

@walterhuangio
Copy link
Contributor

commented Apr 28, 2017

Use block scope for local variables only used in a small code block.
Fixed inverse arguments in some usages of Assert.strictEqual.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
@Trott

This comment has been minimized.

test/sequential/test-module-loading.js Outdated

assert.ok(a.A instanceof Function);
assert.strictEqual('A', a.A());
assert.strictEqual(false, false, 'testing the test program.');

This comment has been minimized.

Copy link
@richardlau

richardlau Apr 28, 2017

Member

I see this was like this before, but is this supposed to be a comment? It will never fail as-is.

This comment has been minimized.

Copy link
@Trott

Trott Apr 29, 2017

Member

That should probably be in test-assert.js and inside an assert.doesNotThrow(). Especially since this is a first-time contribution, I'm OK leaving it. Maybe we can open an issue for it and label it good first contribution for someone else to fix. :-D

This comment has been minimized.

Copy link
@Trott

Trott Apr 29, 2017

Member

(Or, alternatively, I'd be OK with the line simply being removed from this test.)

This comment has been minimized.

Copy link
@walterhuangio

walterhuangio Apr 29, 2017

Author Contributor

Sorry for the late response. I got confused with it a little bit too. I agree with Trott this is not gaining coverage for testing module-loading. Putting it in comment will be an example of how to use strictEqual. I'll remove it then.

This comment has been minimized.

Copy link
@walterhuangio

walterhuangio Apr 29, 2017

Author Contributor

The commit has been updated to remove the unnecessary assertion. I also updated the title of the commit to be in compliance with other PRs.

test: minor fixes to test-module-loading.js
Use block scope for local variables only used in a small code block.
Fixed inverse arguments in some usages of Assert.strictEqual.

@walterhuangio walterhuangio force-pushed the walterhuangio:master branch to f41b4db Apr 29, 2017

@walterhuangio walterhuangio changed the title minor fixes to test-module-loading.js test: minor fixes to test-module-loading.js Apr 29, 2017

@walterhuangio

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2017

@Trott Hi Rich, I've updated the commit associated with the pull request. Is there any steps I missed for this PR to go through? Again thank you for you help!

@Trott
Trott approved these changes May 2, 2017
Copy link
Member

left a comment

LGTM if CI is green

@Trott

This comment has been minimized.

Copy link
Member

commented May 2, 2017

@jasnell
jasnell approved these changes May 2, 2017
Trott added a commit to Trott/io.js that referenced this pull request May 2, 2017
test: minor fixes to test-module-loading.js
Use block scope for local variables only used in a small code block.
Fixed inverse arguments in some usages of Assert.strictEqual.

PR-URL: nodejs#12728
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott

This comment has been minimized.

Copy link
Member

commented May 2, 2017

Landed in 133fb0c.
Thanks for the contribution! 🎉

@Trott Trott closed this May 2, 2017

anchnk pushed a commit to anchnk/node that referenced this pull request May 6, 2017
test: minor fixes to test-module-loading.js
Use block scope for local variables only used in a small code block.
Fixed inverse arguments in some usages of Assert.strictEqual.

PR-URL: nodejs#12728
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell jasnell referenced this pull request May 11, 2017
@gibfahn gibfahn referenced this pull request Jun 15, 2017
2 of 3 tasks complete
@gibfahn

This comment has been minimized.

Copy link
Member

commented Jun 18, 2017

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.