Skip to content

Commit bfcee78

Browse files
author
kingdaro
committed
test: fixed removed plugin error case
1 parent 69c2f1a commit bfcee78

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

  • test/cases/errors/removed-plugins
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
const webpack = require("../../../../lib/webpack");
2-
const should = require("should");
3-
const RemovedPluginError = require('../../../../lib/RemovedPluginError')
2+
const RemovedPluginError = require("../../../../lib/RemovedPluginError");
43

54
it("should error when accessing removed plugins", () => {
6-
should.throws(
7-
() => webpack.optimize.UglifyJsPlugin,
8-
RemovedPluginError,
9-
"webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead."
10-
);
5+
(() => webpack.optimize.UglifyJsPlugin)
6+
.should.throw(
7+
RemovedPluginError,
8+
/webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead./
9+
);
1110

12-
should.throws(
13-
() => webpack.optimize.CommonsChunkPlugin,
14-
RemovedPluginError,
15-
"webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead."
16-
);
17-
});
11+
(() => webpack.optimize.CommonsChunkPlugin)
12+
.should.throw(
13+
RemovedPluginError,
14+
/webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead./
15+
);
16+
})

0 commit comments

Comments
 (0)