Skip to content

Commit

Permalink
tests(module): 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 3277d41 commit 7bde073
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/binCases/module/module-bind/module-bind.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

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

test("module-bind", () => {
const { code, stdout, stderr } = run(__dirname, [
Expand All @@ -21,8 +21,10 @@ test("module-bind", () => {
]);
expect(code).toBe(0);

expect(stdout).toEqual(expect.anything());
expect(stdout).toContain("pre-loaded pre");
expect(stdout).toContain("post-loaded post");
const summary = extractSummary(stdout);

expect(summary).toEqual(expect.anything());
expect(summary).toContain("pre-loaded pre");
expect(summary).toContain("post-loaded post");
expect(stderr).toHaveLength(0);
});

0 comments on commit 7bde073

Please sign in to comment.