rm.on('exit', function (code) { utils.ensureDir(p, function (err) { if (err) throw err; path.exists(p, function (exists) { test.ok(exists); test.done(); }); }); });
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(); }); }); });