Skip to content

Commit

Permalink
Add unit test for same name, different directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kwarismian committed Jan 31, 2014
1 parent e403d6c commit c7a239e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/file.js
Expand Up @@ -57,6 +57,16 @@ tests = {
assert.equal('foo', res[0]); assert.equal('foo', res[0]);
fs.rmdirSync('foo'); fs.rmdirSync('foo');
} }

, 'test cpR with same name and different directory': function () {
file.mkdirP('foo', {silent: true});
fs.writeFileSync('foo/bar.txt', 'w00t');
file.cpR('foo', 'bar', {silent: true});
assert.ok(existsSync('bar/bar.txt'));
file.rmRf('foo', {silent: true});
file.rmRf('bar', {silent: true});

}


, 'test cpR with same to and from will throw': function () { , 'test cpR with same to and from will throw': function () {
assert.throws(function () { assert.throws(function () {
Expand Down

0 comments on commit c7a239e

Please sign in to comment.