Skip to content

Commit 02e08dc

Browse files
hemal7735evenstensberg
authored andcommitted
tests(plugins): use extractSummary
1 parent cb60b15 commit 02e08dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/binCases/plugins/uglifyjsplugin-empty-args/uglifyjsplugin-empty-args.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
const { run } = require("../../../testUtils");
3+
const { run, extractSummary } = require("../../../testUtils");
44

55
test.skip("uglifyjsplugin-empty-args", () => {
66
const { code, stdout, stderr } = run(__dirname, [
@@ -18,11 +18,13 @@ test.skip("uglifyjsplugin-empty-args", () => {
1818
"uglifyjs-webpack-plugin"
1919
]);
2020

21+
const summary = extractSummary(stdout);
22+
2123
expect(code).toBe(0);
2224

23-
expect(stdout).toEqual(expect.anything());
24-
expect(stdout).toContain("bytes"); // without uglifyjs it's multiple kBs
25+
expect(summary).toEqual(expect.anything());
26+
expect(summary).toContain("bytes"); // without uglifyjs it's multiple kBs
2527

2628
expect(stderr).toHaveLength(0);
27-
expect(stdout).toMatchSnapshot();
29+
expect(summary).toMatchSnapshot();
2830
});

0 commit comments

Comments
 (0)