Skip to content

Commit 97f5849

Browse files
author
kingdaro
committed
test(removed plugin errors): correct location/setup
1 parent 96345c2 commit 97f5849

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

‎test/RemovedPlugins.unitest.js‎

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

‎test/cases/errors/removed-plugins/index.js‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)