Skip to content

Commit

Permalink
test/copy/async/copy-gh-98: finished test
Browse files Browse the repository at this point in the history
  • Loading branch information
jprichardson committed Jun 7, 2015
1 parent 2380051 commit 3c1a6c6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions test/copy/async/copy-gh-89.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// relevant: https://github.com/jprichardson/node-fs-extra/issues/89
// come up with better file name

var assert = require('assert')
var fs = require('fs')
var path = require('path')
var os = require('os')
Expand Down Expand Up @@ -35,8 +36,20 @@ describe('copy / gh #89', function () {
fs.writeFileSync(three, '3')
fs.writeFileSync(four, '4')

// shit
// TODO: decide behavior
done()
var C = path.join(TEST_DIR, 'C')
fse.copy(A, C, function (err) {
if (err) return done(err)

fse.copy(B, C, function (err) {
if (err) return done(err)

assert(fs.existsSync(path.join(C, 'one.txt')))
assert(fs.existsSync(path.join(C, 'two.txt')))
assert(fs.existsSync(path.join(C, 'three.txt')))
assert(fs.existsSync(path.join(C, 'four.txt')))
done()
})
})

})
})

0 comments on commit 3c1a6c6

Please sign in to comment.