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

fix test-module-loading test case #11413

Closed

Conversation

tarang9211
Copy link
Contributor

@tarang9211 tarang9211 commented Feb 16, 2017

First contribution to the node repo. This PR provides a small fix to the test-module-loading test case.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 16, 2017
@tarang9211 tarang9211 changed the title eremoved extraneous filename parameter fix test-module-loading test case Feb 16, 2017
@mscdex mscdex added the module Issues and PRs related to the module subsystem. label Feb 16, 2017
@gibfahn
Copy link
Member

gibfahn commented Feb 16, 2017

Please could you format your commit message according to the Contributing Guidelines?

Maybe something like this?

test: remove extra arg from test-module-loading

@tarang9211
Copy link
Contributor Author

One question I had was regarding this. I wanted to add a second argument (a reg exp) that matched the error message, but I'm not sure what the error message is.

@tarang9211
Copy link
Contributor Author

Just modified the commit message also.

@jasnell
Copy link
Member

jasnell commented Feb 16, 2017

@tarang9211 to find out the error message, simply remove the assert.throws() wrapper and run the test and see what error is reported :-)

@tarang9211
Copy link
Contributor Author

@jasnell so basically just this function() { require('./utils') } ?

@jasnell
Copy link
Member

jasnell commented Feb 16, 2017

... just requires('./utils')

@tarang9211
Copy link
Contributor Author

tarang9211 commented Feb 16, 2017

hey @jasnell thanks. here's a pastebin of the logs. Is it the string test name clashes or Cannot find module './utils' ?

If I add that as a second argument, the tests still fail.

@jasnell
Copy link
Member

jasnell commented Feb 16, 2017

You'd want,

assert.throws(function() { require('./utils'); },
              /^Error: Cannot find module '\.\/utils'$/);

@tarang9211
Copy link
Contributor Author

tarang9211 commented Feb 17, 2017

Yup I tried that, too. I get the same output log as the pastebin above.
This is exactly what I have:

assert.throws(function() { require('./utils'); },
              /^Error: Cannot find module '.\/utils'$/);

The regex is appropriate as I got it to validate.

@targos
Copy link
Member

targos commented Feb 18, 2017

@tarang9211 The output log is normal, as long as you don't have a stack trace at the end. I tried running the test with your regexp and it works so I think you can push the change.

@tarang9211
Copy link
Contributor Author

@targos sounds good, thanks for the update. Do have a look at the most recent commit in that case.

@jasnell
Copy link
Member

jasnell commented Feb 20, 2017

@tarang9211
Copy link
Contributor Author

@jasnell Do I break something :O ?

@gibfahn
Copy link
Member

gibfahn commented Feb 20, 2017

@tarang9211 looks like an infrastructure flake, let's try again:

CI 2: https://ci.nodejs.org/job/node-test-commit/8032/

@tarang9211
Copy link
Contributor Author

@gibfahn one more test left 😄

@gibfahn
Copy link
Member

gibfahn commented Feb 20, 2017

@tarang9211 If you click on the link you'll see everything passed. The test/arm failure in the GitHub UI is a reporting infra issue. See nodejs/build#572

@tarang9211
Copy link
Contributor Author

@gibfahn Oh alright, thanks clears it up. So this is ready to be merged?

@gibfahn gibfahn self-assigned this Feb 21, 2017
gibfahn pushed a commit that referenced this pull request Feb 21, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@gibfahn
Copy link
Member

gibfahn commented Feb 21, 2017

Landed in a4c3e31

I squashed the commits and modified the commit message, @tarang9211 in future you could try doing this yourself (not required but helpful!)

Thanks and congrats on your first PR to node!

@gibfahn gibfahn closed this Feb 21, 2017
@tarang9211
Copy link
Contributor Author

@gibfahn sweet! So has this been merged into master, yet?

@gibfahn
Copy link
Member

gibfahn commented Feb 21, 2017

@tarang9211 Yes, if you look at the commit I posted above (a4c3e31) you'll see that it's in master. We don't merge commits in because that creates an extra merge commit (which isn't necessary).

So if you see the Landed in <commit sha> comment, you know the PR has landed.

addaleax pushed a commit that referenced this pull request Feb 22, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@italoacasas italoacasas mentioned this pull request Feb 25, 2017
jasnell pushed a commit that referenced this pull request Mar 7, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
jasnell pushed a commit that referenced this pull request Mar 7, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants