Skip to content

Commit 7554fe7

Browse files
hemal7735evenstensberg
authored andcommitted
tests(config-file): use extractSummary
1 parent ed36260 commit 7554fe7

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

test/binCases/configFile/plugins-precedence/plugins-precedence.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("plugins-precedence", () => {
66
const { code, stdout, stderr } = run(__dirname, [
@@ -18,9 +18,11 @@ test("plugins-precedence", () => {
1818
"TEST=\"ok\""
1919
]);
2020

21+
const summary = extractSummary(stdout);
22+
2123
expect(code).toBe(0);
22-
expect(stdout).toEqual(expect.anything());
23-
expect(stdout).toContain("ok.js");
24+
expect(summary).toEqual(expect.anything());
25+
expect(summary).toContain("ok.js");
2426
expect(stderr).toHaveLength(0);
25-
expect(stdout).toMatchSnapshot();
27+
expect(summary).toMatchSnapshot();
2628
});
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"use strict";
22

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

55
test("profile", () => {
66
const { code, stdout, stderr } = run(__dirname, []);
77

8+
const summary = extractSummary(stdout);
9+
810
expect(code).toBe(0);
9-
expect(stdout).toEqual(expect.anything());
10-
expect(stdout).toContain("factory:");
11+
expect(summary).toEqual(expect.anything());
12+
expect(summary).toContain("factory:");
1113
expect(stderr).toHaveLength(0);
1214
});

0 commit comments

Comments
 (0)