Skip to content

Commit

Permalink
chore(copymitter) lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Dec 17, 2020
1 parent 3d16f8f commit e1496c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/copymitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ const temp = () => {
};

test('file: no args', (t) => {
t.throws(copymitter, /from should be a string!/, 'should throw when no args');
const [error] = tryCatch(copymitter);
t.equal(error.message, 'from should be a string!', 'should throw when no args');
t.end();
});

test('file: no to', (t) => {
const fn = () => copymitter('/hello');
const [error] = tryCatch(copymitter, 'hello');

t.throws(fn, /to should be a string!/, 'should throw when no to');
t.equal(error.message, 'to should be a string!', 'should throw when no to');
t.end();
});

Expand Down

0 comments on commit e1496c3

Please sign in to comment.