Skip to content

Commit

Permalink
test(copymitter) rm EISDIR not create dir
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 2, 2018
1 parent 5974361 commit 242fa26
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/copymitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,6 @@ test('copymitter 1 file: to', (t) => {
});
});

/*
test.only('copymitter 1 file: to (error: EISDIR, not create dir)', (t) => {
const mkdir = fs.mkdir;
const from = path.join(__dirname, '..');
const to = path.join('/tmp', String(Math.random()));
const name = 'lib';
fs.mkdir = (name, mode, cb) => cb();
fs.mkdirSync(to);
const cp = copymitter(from, to, [
name
]);
cp.on('error', (error) => {
t.ok(error, 'should be error');
});
cp.on('end', () => {
//fs.mkdir = mkdir;
rimraf.sync(to);
t.end();
});
});
*/

test('copymitter 1 file: to (error: EISDIR, stat error)', (t) => {
const {stat} = fs;
const from = path.join(__dirname, '..');
Expand Down

0 comments on commit 242fa26

Please sign in to comment.