Skip to content

Commit

Permalink
tests(mode): use extractSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
hemal7735 authored and evenstensberg committed Feb 5, 2019
1 parent 0ba72c4 commit 3277d41
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/binCases/mode/none/none.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
"use strict";

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

test("none", () => {
const { code, stdout, stderr } = run(__dirname, ["./index.js", "--mode", "none"]);

expect(code).toBe(0);
expect(stdout).toEqual(expect.anything());
expect(stdout).toContain("main.js");
expect(stdout).toMatch(/index\.js.*\{0\}/);

const summary = extractSummary(stdout);

expect(summary).toEqual(expect.anything());
expect(summary).toContain("main.js");
expect(summary).toMatch(/index\.js.*\{0\}/);
expect(stderr).toHaveLength(0);
expect(stdout).toMatchSnapshot();
expect(summary).toMatchSnapshot();
});

0 comments on commit 3277d41

Please sign in to comment.