UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

20 lines (18 loc) 494 B
var path = require('path'); var test = require('tape'); var resolve = require('../'); test('filter', function (t) { t.plan(2); var dir = path.join(__dirname, 'resolver'); resolve('./baz', { basedir: dir, packageFilter: function (pkg) { pkg.main = 'doom'; return pkg; } }, function (err, res, pkg) { if (err) t.fail(err); t.equal(res, path.join(dir, 'baz/doom.js')); t.equal(pkg.main, 'doom'); }); });