wallet-core/node_modules/walkdir/test/ignore.js

19 lines
426 B
JavaScript
Raw Normal View History

2017-05-03 15:35:00 +02:00
var test = require('tape')
var walkdir = require('../')
test('async events',function(t){
var paths = [],
files = [],
dirs = [];
var emitter = walkdir(__dirname+'/dir/foo',function(path){
paths.push(path.replace(__dirname+'/',''));
}).ignore(__dirname+'/dir/foo/a');
emitter.on('end',function(){
t.equals(paths.sort().join('|'),'dir/foo/a|dir/foo/x','should have ignored under a');
t.end();
})
})