Permalink
Browse files

existsSync has moved from path to fs

  • Loading branch information...
1 parent d669c46 commit 9b892798cd019d48deb3122b41ea75aad3e398e0 @petebacondarwin petebacondarwin committed Jul 20, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/coffee_test.js
View
8 test/coffee_test.js
@@ -2,6 +2,8 @@ var grunt = require('grunt'),
fs = require('fs'),
path = require('path');
+fs.existsSync = fs.existsSync ? fs.existsSync : path.existsSync;
+
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
@@ -35,13 +37,13 @@ exports['coffee'] = {
},
tearDown: function(done) {
- if (path.existsSync(destFolder)) {
- if ( path.existsSync(destFolder + '/hello_world.js') ) {
+ if (fs.existsSync(destFolder)) {
+ if ( fs.existsSync(destFolder + '/hello_world.js') ) {
fs.unlinkSync(destFolder + '/hello_world.js');
}
fs.rmdirSync(destFolder);
}
- if (path.existsSync(relativeDest(src))) {
+ if (fs.existsSync(relativeDest(src))) {
fs.unlinkSync(relativeDest(src));
}
done();

0 comments on commit 9b89279

Please sign in to comment.