buddy

node MVC discord bot
Log | Files | Refs | README

filter_sync.js (359B)


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