now has fileTree function

This commit is contained in:
2016-07-01 01:37:48 +02:00
parent 38f10e0d04
commit 23188dfe3f
10 changed files with 70 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,8 +8,6 @@ import should = require("should");
let vinyl = require("vinyl");
describe("smartfile".yellow,function(){
describe(".fs".yellow,function(){
describe(".fileExistsSync".yellow,function(){
it("should return an accurate boolean",function(){
@ -58,6 +56,16 @@ describe("smartfile".yellow,function(){
});
});
});
describe(".listFileTree()",function(){
it("should get a file tree",function(done){
smartfile.fs.listFileTree(path.resolve("./test/"),"**/*.txt")
.then(function(folderArrayArg){
folderArrayArg.should.containDeep([ "testfolder/testfile1.txt"]);
folderArrayArg.should.not.containDeep([ "mytest.json"]);
done();
});
});
});
describe(".copy()".yellow,function(){
it("should copy a directory",function(){
smartfile.fs.copy("./test/testfolder/","./test/temp/")