Update checked-in dependencies
This commit is contained in:
parent
6b0d45a5c6
commit
cc1adb825a
4247 changed files with 144820 additions and 149530 deletions
32
node_modules/resolve/test/resolver.js
generated
vendored
32
node_modules/resolve/test/resolver.js
generated
vendored
|
|
@ -256,6 +256,22 @@ test('other path', function (t) {
|
|||
});
|
||||
});
|
||||
|
||||
test('path iterator', function (t) {
|
||||
t.plan(2);
|
||||
|
||||
var resolverDir = path.join(__dirname, 'resolver');
|
||||
|
||||
var exactIterator = function (x, start, getPackageCandidates, opts) {
|
||||
return [path.join(resolverDir, x)];
|
||||
};
|
||||
|
||||
resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) {
|
||||
if (err) t.fail(err);
|
||||
t.equal(res, path.join(resolverDir, 'baz/quux.js'));
|
||||
t.equal(pkg && pkg.name, 'baz');
|
||||
});
|
||||
});
|
||||
|
||||
test('incorrect main', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
|
|
@ -299,6 +315,22 @@ test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is
|
|||
});
|
||||
});
|
||||
|
||||
test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
|
||||
t.plan(2);
|
||||
|
||||
var dir = path.join(__dirname, 'resolver');
|
||||
|
||||
resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
|
||||
if (err) t.fail(err);
|
||||
t.equal(res, path.join(dir, 'same_names/foo/index.js'));
|
||||
});
|
||||
|
||||
resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
|
||||
if (err) t.fail(err);
|
||||
t.equal(res, path.join(dir, 'same_names/foo/index.js'));
|
||||
});
|
||||
});
|
||||
|
||||
test('async: #121 - treating an existing file as a dir when no basedir', function (t) {
|
||||
var testFile = path.basename(__filename);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue