buddy

node MVC discord bot
Log | Files | Refs | README

filter.js (450B)


      1 var test = require('tape');
      2 var resolve = require('../');
      3 
      4 test('filter', function (t) {
      5     t.plan(2);
      6     var dir = __dirname + '/resolver';
      7     resolve('./baz', {
      8         basedir : dir,
      9         packageFilter : function (pkg) {
     10             pkg.main = 'doom';
     11             return pkg;
     12         }
     13     }, function (err, res, pkg) {
     14         if (err) t.fail(err);
     15         t.equal(res, dir + '/baz/doom.js');
     16         t.equal(pkg.main, 'doom');
     17     });
     18 });