Skip to content

Commit 6922a5e

Browse files
authored
Merge pull request webpack#6283 from webpack/test/no-minimize-config-cases
disable minimizer for config test cases
2 parents 069a3e6 + 0b26a6b commit 6922a5e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/ConfigTestCases.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ describe("ConfigTestCases", () => {
4545
optionsArr.forEach((options, idx) => {
4646
if(!options.context) options.context = testDirectory;
4747
if(!options.mode) options.mode = "production";
48+
if(!options.optimization) options.optimization = {
49+
minimize: false
50+
};
4851
if(!options.entry) options.entry = "./index.js";
4952
if(!options.target) options.target = "async-node";
5053
if(!options.output) options.output = {};

test/configCases/errors/multi-entry-missing-module/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ it("Should use WebpackMissingModule when module is missing with multiple entry s
22
var fs = require("fs");
33
var path = require("path");
44
var source = fs.readFileSync(path.join(__dirname, "b.js"), "utf-8");
5-
source.should.containEql("!function(){var n=new Error('Cannot find module \"./intentionally-missing-module.js\"');throw n.code=\"MODULE_NOT_FOUND\",n}()}");
5+
source.should.containEql("!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./intentionally-missing-module.js\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }());");
66

77
(function() {
88
require("./intentionally-missing-module");

0 commit comments

Comments
 (0)