Skip to content

Commit c2e6132

Browse files
committed
Use non-parallel minimizer for testing to make CI more stable
1 parent ddcfa37 commit c2e6132

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

test/TestCases.test.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ const fs = require("fs");
77
const vm = require("vm");
88
const mkdirp = require("mkdirp");
99
const Test = require("mocha/lib/test");
10+
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
1011
const checkArrayExpectation = require("./checkArrayExpectation");
1112

1213
const Stats = require("../lib/Stats");
1314
const webpack = require("../lib/webpack");
1415

16+
const uglifyJsForTesting = new UglifyJsPlugin({
17+
cache: false,
18+
parallel: false,
19+
sourceMap: true
20+
});
21+
1522
const DEFAULT_OPTIMIZATIONS = {
1623
removeAvailableModules: true,
1724
removeEmptyChunks: true,
@@ -24,10 +31,16 @@ const DEFAULT_OPTIMIZATIONS = {
2431
noEmitOnErrors: false,
2532
concatenateModules: false,
2633
namedModules: false,
34+
minimizer: [
35+
uglifyJsForTesting
36+
]
2737
};
2838

2939
const NO_EMIT_ON_ERRORS_OPTIMIZATIONS = {
30-
noEmitOnErrors: false
40+
noEmitOnErrors: false,
41+
minimizer: [
42+
uglifyJsForTesting
43+
]
3144
};
3245

3346
describe("TestCases", () => {

0 commit comments

Comments
 (0)