mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
A module ID with a trailing slash must be a dir.
require('./foo/') should not try to load './foo.js'. It should only
look for ./foo/index.js
Closes GH-588
This commit is contained in:
1 parent
36ef5643c3
commit
6cdeb3b3fd
4 files changed
+17
-5
No files matched your search
Whitespace-only changes.
Whitespace-only changes.
@@ -52,6 +52,13 @@ var one = require('../fixtures/nested-index/one'),
|
||||
two = require('../fixtures/nested-index/two');
|
||||
assert.notEqual(one.hello, two.hello);
|
||||
|
||||
common.debug('test index.js in a folder with a trailing slash');
|
||||
var three = require('../fixtures/nested-index/three'),
|
||||
threeFolder = require('../fixtures/nested-index/three/'),
|
||||
threeIndex = require('../fixtures/nested-index/three/index.js');
|
||||
assert.equal(threeFolder, threeIndex);
|
||||
assert.notEqual(threeFolder, three);
|
||||
|
||||
common.debug('test cycles containing a .. path');
|
||||
var root = require('../fixtures/cycles/root'),
|
||||
foo = require('../fixtures/cycles/folder/foo');
|
||||
|
||||
Reference in new issue
Block a user