Skip to content

Commit

Permalink
tests(plugins): use extractSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
hemal7735 committed Jan 21, 2019
1 parent 8762685 commit f791946
Showing 1 changed file with 6 additions and 4 deletions.
@@ -1,6 +1,6 @@
"use strict";

const { run } = require("../../../testUtils");
const { run, extractSummary } = require("../../../testUtils");

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

const summary = extractSummary(stdout);

expect(code).toBe(0);

expect(stdout).toEqual(expect.anything());
expect(stdout).toContain("bytes"); // without uglifyjs it's multiple kBs
expect(summary).toEqual(expect.anything());
expect(summary).toContain("bytes"); // without uglifyjs it's multiple kBs

expect(stderr).toHaveLength(0);
expect(stdout).toMatchSnapshot();
expect(summary).toMatchSnapshot();
});

0 comments on commit f791946

Please sign in to comment.