From 93237ddc5a7f36df2fb5696afdafd15e41c10f6b Mon Sep 17 00:00:00 2001 From: JP Richardson Date: Mon, 30 Dec 2013 10:28:13 -0600 Subject: [PATCH] added test for copy() when source dir() does not exist. --- test/copy.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/copy.test.js b/test/copy.test.js index 67b4991..55e0f9c 100644 --- a/test/copy.test.js +++ b/test/copy.test.js @@ -97,6 +97,17 @@ describe('fs-extra', function() { }) describe('> when the source is a directory', function() { + describe('> when the source directory does not exist', function() { + it('should return an error', function(done) { + var ts = path.join(DIR, 'this_dir_does_not_exist') + var td = path.join(DIR, 'this_dir_really_does_not_matter') + fs.copy(ts, td, function(err) { + T (err) + done() + }) + }) + }) + it('should copy the directory asynchronously', function(done) { var FILES = 2 , src = path.join(DIR, 'src')