Skip to content

Commit

Permalink
Breaking test for browserify#76
Browse files Browse the repository at this point in the history
This test shows that deep references do not work currently.
  • Loading branch information
matthewp committed Mar 11, 2015
1 parent a225602 commit 1256cf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/pathfilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var test = require('tape');
var resolve = require('../');

test('#62: deep module references and the pathFilter', function(t){
t.plan(6);
t.plan(9);

var resolverDir = __dirname + '/pathfilter/deep_ref';
var pathFilter = function(pkg, x, remainder){
Expand All @@ -14,9 +14,18 @@ test('#62: deep module references and the pathFilter', function(t){

resolve('deep/ref', { basedir : resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);

t.equal(pkg.version, "1.2.3");
t.equal(res, resolverDir + '/node_modules/deep/ref.js');
});

resolve('deep/deeper/ref', { basedir: resolverDir },
function(err, res, pkg) {
if(err) t.fail(err);
t.notEqual(pkg, undefined);
t.equal(pkg.version, "1.2.3");
t.equal(res, resolverDir + '/node_modules/deep/deeper/ref.js');
});

resolve('deep/ref', { basedir : resolverDir, pathFilter : pathFilter },
function (err, res, pkg) {
Expand Down
Empty file.

0 comments on commit 1256cf0

Please sign in to comment.