diff --git a/test/binCases/configFile/plugins-precedence/plugins-precedence.test.js b/test/binCases/configFile/plugins-precedence/plugins-precedence.test.js index eb3e265bd4e..42e7575ab1f 100644 --- a/test/binCases/configFile/plugins-precedence/plugins-precedence.test.js +++ b/test/binCases/configFile/plugins-precedence/plugins-precedence.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run } = require("../../../testUtils"); +const { run, extractSummary } = require("../../../testUtils"); test("plugins-precedence", () => { const { code, stdout, stderr } = run(__dirname, [ @@ -18,9 +18,11 @@ test("plugins-precedence", () => { "TEST=\"ok\"" ]); + const summary = extractSummary(stdout); + expect(code).toBe(0); - expect(stdout).toEqual(expect.anything()); - expect(stdout).toContain("ok.js"); + expect(summary).toEqual(expect.anything()); + expect(summary).toContain("ok.js"); expect(stderr).toHaveLength(0); - expect(stdout).toMatchSnapshot(); + expect(summary).toMatchSnapshot(); }); diff --git a/test/binCases/configFile/profile/profile.test.js b/test/binCases/configFile/profile/profile.test.js index 716611835b6..d5745d36ce7 100644 --- a/test/binCases/configFile/profile/profile.test.js +++ b/test/binCases/configFile/profile/profile.test.js @@ -1,12 +1,14 @@ "use strict"; -const { run } = require("../../../testUtils"); +const { run, extractSummary } = require("../../../testUtils"); test("profile", () => { const { code, stdout, stderr } = run(__dirname, []); + const summary = extractSummary(stdout); + expect(code).toBe(0); - expect(stdout).toEqual(expect.anything()); - expect(stdout).toContain("factory:"); + expect(summary).toEqual(expect.anything()); + expect(summary).toContain("factory:"); expect(stderr).toHaveLength(0); });