[fix] path.existsSync was moved to fs.existsSync
This commit is contained in:
parent
d1ffccba60
commit
a0749b36ac
2 changed files with 4 additions and 4 deletions
|
|
@ -7,11 +7,11 @@ module.exports = testCase({
|
||||||
test_mkdirSyncRecursive: function(test) {
|
test_mkdirSyncRecursive: function(test) {
|
||||||
var dir = __dirname + '/_tmp/foo/bar';
|
var dir = __dirname + '/_tmp/foo/bar';
|
||||||
|
|
||||||
test.equals(path.existsSync(dir), false, 'Dir shouldn\'t exist - clean it up manually?');
|
test.equals(fs.existsSync(dir), false, 'Dir shouldn\'t exist - clean it up manually?');
|
||||||
|
|
||||||
wrench.mkdirSyncRecursive(dir, 0777);
|
wrench.mkdirSyncRecursive(dir, 0777);
|
||||||
|
|
||||||
test.equals(path.existsSync(dir), true, 'Dir should exist now');
|
test.equals(fs.existsSync(dir), true, 'Dir should exist now');
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
while (dir != __dirname) {
|
while (dir != __dirname) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ module.exports = testCase({
|
||||||
test_readdirSyncRecursive: function(test) {
|
test_readdirSyncRecursive: function(test) {
|
||||||
var dir = path.join(__dirname, 'readdir');
|
var dir = path.join(__dirname, 'readdir');
|
||||||
|
|
||||||
test.ok(path.existsSync(dir), 'Folders should exist');
|
test.ok(fs.existsSync(dir), 'Folders should exist');
|
||||||
|
|
||||||
var files = wrench.readdirSyncRecursive(dir);
|
var files = wrench.readdirSyncRecursive(dir);
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ module.exports = testCase({
|
||||||
test_readdirRecursive: function(test) {
|
test_readdirRecursive: function(test) {
|
||||||
var dir = path.join(__dirname, 'readdir');
|
var dir = path.join(__dirname, 'readdir');
|
||||||
|
|
||||||
test.ok(path.existsSync(dir), 'Folders should exist');
|
test.ok(fs.existsSync(dir), 'Folders should exist');
|
||||||
|
|
||||||
var allFiles = [];
|
var allFiles = [];
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue