Skip to content

Commit 4094a73

Browse files
julienjweaverryan
authored andcommitted
Fix unit test
1 parent cf2c1a7 commit 4094a73

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/WebpackConfig.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,19 @@ describe('WebpackConfig object', () => {
306306
expect(config.useVueLoader).to.be.true;
307307
expect(config.vueOptions.extractCSS).to.be.true;
308308
});
309+
});
310+
311+
describe('addPlugin', () => {
312+
it('extends the current registered plugins', () => {
313+
const config = createConfig();
314+
const nbOfPlugins = config.plugins.length;
309315

316+
expect(nbOfPlugins).to.equal(0);
317+
318+
config.addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
319+
320+
expect(config.plugins.length).to.equal(1);
321+
});
310322
});
311323

312324
describe('addLoader', () => {

0 commit comments

Comments
 (0)