From 064339d58acbbf730b362ab19e3731cee7ede71f Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 15 Jul 2024 19:13:01 +0000 Subject: [PATCH] Show full output if exit code is nonzero --- eng/tools/tsp-client-tests/test/tsp-client.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/tools/tsp-client-tests/test/tsp-client.test.ts b/eng/tools/tsp-client-tests/test/tsp-client.test.ts index 4ebd58e45203..6cdc45c51e06 100644 --- a/eng/tools/tsp-client-tests/test/tsp-client.test.ts +++ b/eng/tools/tsp-client-tests/test/tsp-client.test.ts @@ -10,7 +10,7 @@ async function tspClient(...args: string[]) { console.log(`${repoRoot}$ npm ${allArgs.join(" ")}`); - return await execa("npm", allArgs, { cwd: repoRoot, reject: false }); + return await execa("npm", allArgs, { all: true, cwd: repoRoot, reject: false }); } async function convert(expect: ExpectStatic, readme: string) { @@ -26,7 +26,7 @@ async function convert(expect: ExpectStatic, readme: string) { } try { - const { stdout, exitCode } = await tspClient( + const { stdout, all, exitCode } = await tspClient( "convert", "--no-prompt", "--swagger-readme", @@ -37,7 +37,7 @@ async function convert(expect: ExpectStatic, readme: string) { ); expect(stdout).toContain("Converting"); - expect(exitCode).toBe(0); + expect(exitCode, all).toBe(0); const tspConfigYaml = join(outputFolder, "tspconfig.yaml"); await access(tspConfigYaml, constants.R_OK);