Skip to content

Commit a2b9983

Browse files
committed
fix tests
1 parent 794b883 commit a2b9983

5 files changed

Lines changed: 13 additions & 15 deletions

File tree

test/Examples.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ describe("Examples", () => {
3333
options.output.filename = "output.js";
3434
if(!options.entry)
3535
options.entry = "./example.js";
36+
if(!options.plugins)
37+
options.plugins = [];
38+
// To support deprecated loaders
39+
// TODO remove in webpack 5
40+
options.plugins.push(new webpack.LoaderOptionsPlugin({
41+
options: {}
42+
}));
3643
}
3744
webpack(options, (err, stats) => {
3845
if(err) return done(err);

test/Stats.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ describe("Stats", () => {
3131
if(!options.context) options.context = path.join(base, testName);
3232
if(!options.output) options.output = options.output || {};
3333
if(!options.output.path) options.output.path = path.join(outputBase, testName);
34+
if(!options.plugins) options.plugins = [];
35+
// To support deprecated loaders
36+
// TODO remove in webpack 5
37+
options.plugins.push(new webpack.LoaderOptionsPlugin({
38+
options: {}
39+
}));
3440
});
3541
const c = webpack(options);
3642
const compilers = c.compilers ? c.compilers : [c];

test/watchCases/cache/warning-on-not-cacheable/0/index.js

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

test/watchCases/cache/warning-on-not-cacheable/0/warnings.js

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

test/watchCases/cache/warning-on-not-cacheable/webpack.config.js

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

0 commit comments

Comments
 (0)