diff --git a/lib/copy/__tests__/copy.test.js b/lib/copy/__tests__/copy.test.js index bb3dd8a..bf4c5c4 100644 --- a/lib/copy/__tests__/copy.test.js +++ b/lib/copy/__tests__/copy.test.js @@ -21,7 +21,6 @@ describe('fs-extra', function () { }) describe('+ copy()', function () { - it('should return an error if src and dest are the same', function (done) { var fileSrc = path.join(TEST_DIR, 'TEST_fs-extra_copy') var fileDest = path.join(TEST_DIR, 'TEST_fs-extra_copy') diff --git a/lib/copy/copy.js b/lib/copy/copy.js index b9948eb..d9d2912 100644 --- a/lib/copy/copy.js +++ b/lib/copy/copy.js @@ -17,7 +17,7 @@ function copy (src, dest, options, callback) { var basePath = process.cwd() var currentPath = path.resolve(basePath, src) var targetPath = path.resolve(basePath, dest) - if ( currentPath === targetPath ) return callback( new Error('Source and destination must not be the same.')) + if (currentPath === targetPath) return callback(new Error('Source and destination must not be the same.')) fs.lstat(src, function (err, stats) { if (err) return callback(err)