aboutsummaryrefslogtreecommitdiff
path: root/node_modules/walkdir/test/sync.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/walkdir/test/sync.js
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/walkdir/test/sync.js')
-rw-r--r--node_modules/walkdir/test/sync.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/node_modules/walkdir/test/sync.js b/node_modules/walkdir/test/sync.js
deleted file mode 100644
index db2d07219..000000000
--- a/node_modules/walkdir/test/sync.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var test = require('tape'),
-walkdir = require('../walkdir.js');
-
-var expectedPaths = {
-'dir/foo/x':'file',
-'dir/foo/a':'dir',
-'dir/foo/a/y':'file',
-'dir/foo/a/b':'dir',
-'dir/foo/a/b/z':'file',
-'dir/foo/a/b/c':'dir',
-'dir/foo/a/b/c/w':'file'
-};
-
-test('sync',function(t){
- var paths = [],
- files = [],
- dirs = [];
-
- var pathResult = walkdir.sync(__dirname+'/dir/foo',function(path){
- console.log('path: ',path);
- paths.push(path);
- });
-
- t.ok(pathResult instanceof Array,'if return object is not specified should be an array');
-
- t.equals(Object.keys(expectedPaths).length,paths.length,'should have found the same number of paths as expected');
-
-
- Object.keys(expectedPaths).forEach(function(v,k){
-
- t.ok(paths.indexOf(__dirname+'/'+v) > -1,v+' should be found');
- });
-
- t.deepEquals(paths,pathResult,'paths should be equal to pathResult');
-
- t.end();
-});
-
-test('sync return object',function(t){
-
- var pathResult = walkdir.sync(__dirname+'/dir/foo',{return_object:true});
-
- t.ok(!(pathResult instanceof Array),'if return object is not specified should be an array');
-
- t.equals(Object.keys(expectedPaths).length,Object.keys(pathResult).length,'should find the same number of paths as expected');
-
- Object.keys(expectedPaths).forEach(function(v,k){
- t.ok(pathResult[__dirname+'/'+v],'should find path in result object');
- });
-
- t.end();
-});