now has get.folders() and get.foldersSync function

This commit is contained in:
2016-04-14 20:33:58 +02:00
parent aed2c92b75
commit 4b1f3d234b
5 changed files with 79 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -46,6 +46,30 @@ describe("smartfile".yellow,function(){
});
});
describe(".get",function(){
describe(".filetype()",function(){
it("should get the file type from a string",function(){
smartfile.get.filetype("./somefolder/data.json").should.equal("json");
});
});
describe(".foldersSync()",function(){
it("should get the file type from a string",function(){
smartfile.get.foldersSync("./test/").should.containDeep([ "testfolder"]);
smartfile.get.foldersSync("./test/").should.not.containDeep([ "notExistentFolder"]);
});
});
describe(".folders()",function(){
it("should get the file type from a string",function(done){
smartfile.get.folders("./test/")
.then(function(folderArrayArg){
folderArrayArg.should.containDeep([ "testfolder"]);
folderArrayArg.should.not.containDeep([ "notExistentFolder"]);
done();
});
});
});
});
describe(".local".yellow,function(){
describe("toGulpStreamSync() and toGulpDestSync",function(){