Skip to content

Commit 7bde073

Browse files
hemal7735evenstensberg
authored andcommitted
tests(module): use extractSummary
1 parent 3277d41 commit 7bde073

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/binCases/module/module-bind/module-bind.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("module-bind", () => {
66
const { code, stdout, stderr } = run(__dirname, [
@@ -21,8 +21,10 @@ test("module-bind", () => {
2121
]);
2222
expect(code).toBe(0);
2323

24-
expect(stdout).toEqual(expect.anything());
25-
expect(stdout).toContain("pre-loaded pre");
26-
expect(stdout).toContain("post-loaded post");
24+
const summary = extractSummary(stdout);
25+
26+
expect(summary).toEqual(expect.anything());
27+
expect(summary).toContain("pre-loaded pre");
28+
expect(summary).toContain("post-loaded post");
2729
expect(stderr).toHaveLength(0);
2830
});

0 commit comments

Comments
 (0)