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: call toLowerCase on the resolved module #16486

Closed
wants to merge 1 commit into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Oct 25, 2017

The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 25, 2017
@danbev
Copy link
Contributor Author

danbev commented Oct 25, 2017

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM. Looks like this was introduced in #15984 and fixes #16357?

@bnoordhuis bnoordhuis mentioned this pull request Oct 25, 2017
2 tasks
@lpinca
Copy link
Member

lpinca commented Oct 25, 2017

I think it makes sense to fast track this.

@mscdex mscdex added the module Issues and PRs related to the module subsystem. label Oct 25, 2017
@jasnell
Copy link
Member

jasnell commented Oct 25, 2017

+1 to fast tracking... landing now

jasnell pushed a commit that referenced this pull request Oct 25, 2017
The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

```
$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
```

PR-URL: #16486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>>
Reviewed-By: Anna Henningsen <anna@addaleax.net>>
Reviewed-By: James M Snell <jasnell@gmail.com>>
@jasnell
Copy link
Member

jasnell commented Oct 25, 2017

Landed in 8a00f1d

@jasnell jasnell closed this Oct 25, 2017
cjihrig pushed a commit that referenced this pull request Oct 25, 2017
The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

```
$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
```

PR-URL: #16486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>>
Reviewed-By: Anna Henningsen <anna@addaleax.net>>
Reviewed-By: James M Snell <jasnell@gmail.com>>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

```
$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
```

PR-URL: nodejs/node#16486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>>
Reviewed-By: Anna Henningsen <anna@addaleax.net>>
Reviewed-By: James M Snell <jasnell@gmail.com>>
@danbev danbev deleted the test-require-resolve-lowercase branch November 16, 2017 08:41
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
The commit updates test-require-resolve.js to call toLowerCase on the
resolved module instead of the path. Currently this test will fail if
the path to where node exists contains uppercase letters. For example:

```
$ out/Release/node
test/parallel/test-require-resolve.js
/root/rpmbuild/BUILD/node-v8.8.0/test/parallel
module.js:515
    throw err;
    ^

Error: Cannot find module
'/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one'
    at Function.Module._resolveFilename (module.js:513:15)
    at Function.resolve (internal/module.js:18:19)
    at Object.<anonymous>
(/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
    at startup (bootstrap_node.js:187:16)
```

PR-URL: nodejs/node#16486
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>>
Reviewed-By: Anna Henningsen <anna@addaleax.net>>
Reviewed-By: James M Snell <jasnell@gmail.com>>
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.

9 participants