Skip to content

Commit

Permalink
test: improve testing for misuse
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocodutra authored and jantimon committed Aug 14, 2019
1 parent 2e6d2ee commit c663cfe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/usage.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import test from 'ava';
import FaviconsWebpackPlugin from '..';

import {logo} from './util';
import {logo, mkdir} from './util';

test('should throw error when called without arguments', t => {
test('should throw error when instantiated without a logo', t => {
try {
new FaviconsWebpackPlugin();
} catch (err) {
t.is(err.message, 'FaviconsWebpackPlugin options are required');
}

try {
new WebappWebpackPlugin({});
} catch (err) {
t.is(err.message, 'An input file is required');
}
});

test('should take a string as argument', t => {
Expand Down

0 comments on commit c663cfe

Please sign in to comment.