Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / walkdir / test / ignore-first.js
diff --git a/legacy-libs/walkdir/test/ignore-first.js b/legacy-libs/walkdir/test/ignore-first.js
new file mode 100644 (file)
index 0000000..7db0382
--- /dev/null
@@ -0,0 +1,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();
+  })
+
+})