Skip to content

Commit

Permalink
Remove setTimeout when preserveTimestamp is true
Browse files Browse the repository at this point in the history
  • Loading branch information
manidlou committed Nov 11, 2017
1 parent fda912a commit 546216c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/copy-sync/__tests__/copy-sync-preserve-time.test.js
Expand Up @@ -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}))
})
})

Expand Down

0 comments on commit 546216c

Please sign in to comment.