コード例 #1
0
ファイル: test-lib-utils.js プロジェクト: iriscouch/kanso
 rm.on('exit', function (code) {
     utils.ensureDir(p, function (err) {
         if (err) throw err;
         path.exists(p, function (exists) {
             test.ok(exists);
             test.done();
         });
     });
 });
コード例 #2
0
ファイル: test-lib-utils.js プロジェクト: iriscouch/kanso
 fs.readdir(p, function (err, files) {
     utils.ensureDir(p, function (err) {
         if (err) throw err;
         fs.readdir(p, function (err, new_files) {
             // test the contents of the directory are unchanged
             test.same(files, new_files);
             test.done();
         });
     });
 });