Skip to content

Commit 55392f2

Browse files
author
kingdaro
committed
test: added case for plugin errors
1 parent 3b2e331 commit 55392f2

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • test/cases/errors/removed-plugins
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const webpack = require("../../../../lib/webpack");
2+
const should = require("should");
3+
4+
it("should error when accessing removed plugins", () => {
5+
should.throws(
6+
() => webpack.optimize.UglifyJsPlugin,
7+
Error,
8+
"webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead."
9+
);
10+
11+
should.throws(
12+
() => webpack.optimize.CommonsChunkPlugin,
13+
Error,
14+
"webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead."
15+
);
16+
});

0 commit comments

Comments
 (0)