-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: remove require('.') with NODE_PATH compatibilty
- Loading branch information
1 parent
cd60ff0
commit ca16df6
Showing
2 changed files
with
2 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
var common = require('../common'); | ||
var assert = require('assert'); | ||
var module = require('module'); | ||
|
||
var a = require(common.fixturesDir + '/module-require/relative/dot.js'); | ||
var b = require(common.fixturesDir + '/module-require/relative/dot-slash.js'); | ||
|
||
assert.equal(a.value, 42); | ||
assert.equal(a, b, 'require(".") should resolve like require("./")'); | ||
|
||
process.env.NODE_PATH = common.fixturesDir + '/module-require/relative'; | ||
module._initPaths(); | ||
|
||
var c = require('.'); | ||
|
||
assert.equal(c.value, 42, 'require(".") should honor NODE_PATH'); | ||
assert.equal(a, b, 'require(".") should resolve like require("./")'); |