Skip to content

Commit

Permalink
chore: add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Aug 1, 2019
1 parent 3783b8b commit 03be90a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/license-plugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,19 @@ describe('LicensePlugin', () => {
]));
});

it('should fail to prepend banner if comment style option is unknown', () => {
const instance = new LicensePlugin({
banner: {
file: path.join(__dirname, 'fixtures', 'banner.txt'),
commentStyle: 'foobar',
},
});

expect(() => instance.prependBanner('var foo = 0;')).toThrow(new Error(
'Unknown comment style foobar, please use one of: regular,ignored,slash,none'
));
});

it('should prepend banner to bundle and create sourceMap', () => {
const instance = new LicensePlugin({
banner: {
Expand Down

0 comments on commit 03be90a

Please sign in to comment.