aboutsummaryrefslogtreecommitdiff
path: root/node_modules/walkdir/test/ignore-first.js
blob: 7db03828db4e49f8e4add418fdfd821e277f21d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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');

  emitter.on('end',function(){
    t.equals(paths.length,0,'should have no paths')
    t.end();
  })

})