blob: fd4e97c28370b5e7aa0e06201cc629eb44561e9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('filter', function (t) {
var dir = path.join(__dirname, 'resolver');
var res = resolve.sync('./baz', {
basedir: dir,
packageFilter: function (pkg) {
pkg.main = 'doom';
return pkg;
}
});
t.equal(res, path.join(dir, 'baz/doom.js'));
t.end();
});
|