diff options
author | Myles Borins <mylesborins@google.com> | 2017-10-31 01:51:01 -0400 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-10-31 09:14:19 -0700 |
commit | 82790d84f2049cdd5e9aac4818a096834bed0118 (patch) | |
tree | c8f4a78cd7386799ef7c1eccb4a1fe2d72445126 /test | |
parent | dfcaf280b728b20e536c27964ae1446342d98607 (diff) | |
download | android-node-v8-82790d84f2049cdd5e9aac4818a096834bed0118.tar.gz android-node-v8-82790d84f2049cdd5e9aac4818a096834bed0118.tar.bz2 android-node-v8-82790d84f2049cdd5e9aac4818a096834bed0118.zip |
module: revert #3384 DEP0019 EOL
The original commit was landed without running CITGM. Unfortunately
this change breaks the module `d` which has over 500k downloads a day.
It is worth mentioning that the compatibility hack can be removed
without breaking anything.
We should definitely revisit for the next Semver-Major but shipping
this today will cause non trivial ecosystem breakages.
Refs: https://github.com/nodejs/node/pull/3384
PR-URL: https://github.com/nodejs/node/pull/16634
Refs: https://github.com/nodejs/node/pull/3384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-require-dot.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/parallel/test-require-dot.js b/test/parallel/test-require-dot.js index 2e8a5c79f6..e2202efec1 100644 --- a/test/parallel/test-require-dot.js +++ b/test/parallel/test-require-dot.js @@ -10,7 +10,9 @@ const b = require(fixtures.path('module-require', 'relative', 'dot-slash.js')); assert.strictEqual(a.value, 42); assert.strictEqual(a, b, 'require(".") should resolve like require("./")'); -// require('.') should not lookup in NODE_PATH process.env.NODE_PATH = fixtures.path('module-require', 'relative'); m._initPaths(); -assert.throws(() => { require('.'); }, Error, "Cannot find module '.'"); + +const c = require('.'); + +assert.strictEqual(c.value, 42, 'require(".") should honor NODE_PATH'); |