From 546216ccdd3410f1f75910a93593e2bd6ef8350f Mon Sep 17 00:00:00 2001 From: Mani Maghsoudlou Date: Fri, 10 Nov 2017 18:20:40 -0800 Subject: [PATCH] Remove setTimeout when preserveTimestamp is true --- lib/copy-sync/__tests__/copy-sync-preserve-time.test.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/copy-sync/__tests__/copy-sync-preserve-time.test.js b/lib/copy-sync/__tests__/copy-sync-preserve-time.test.js index c9d21ae..4154486 100644 --- a/lib/copy-sync/__tests__/copy-sync-preserve-time.test.js +++ b/lib/copy-sync/__tests__/copy-sync-preserve-time.test.js @@ -39,16 +39,13 @@ describeIf64('copySync() - preserveTimestamps option', () => { }) describe('> when preserveTimestamps option is true', () => { - it('should have the same timestamps on copy', done => { + it('should have the same timestamps on copy', () => { src = path.join(TEST_DIR, 'src') dest = path.join(TEST_DIR, 'dest') FILES.forEach(f => fs.ensureFileSync(path.join(src, f))) - setTimeout(() => { - fs.copySync(src, dest, {preserveTimestamps: true}) - FILES.forEach(testFile({preserveTimestamps: true})) - done() - }, 100) + fs.copySync(src, dest, {preserveTimestamps: true}) + FILES.forEach(testFile({preserveTimestamps: true})) }) })