Skip to content

Commit

Permalink
Show full output if exit code is nonzero
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeharder committed Jul 15, 2024
1 parent 8c0761b commit 064339d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eng/tools/tsp-client-tests/test/tsp-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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",
Expand All @@ -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);
Expand Down

0 comments on commit 064339d

Please sign in to comment.