Browse Source

Remove setTimeout when preserveTimestamp is true

ci/travis-osximage
Mani Maghsoudlou 7 years ago
parent
commit
546216ccdd
  1. 9
      lib/copy-sync/__tests__/copy-sync-preserve-time.test.js

9
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}))
})
})

Loading…
Cancel
Save