Skip to content

Commit 5a220c6

Browse files
chore: tests add more logs for easier debugging (#3589)
1 parent 7fcae1d commit 5a220c6

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

packages/init/src/init_test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,20 @@ async function patchProject(dir: string): Promise<void> {
8282
json.lint.rules.include = ["verbatim-module-syntax"];
8383

8484
await Deno.writeTextFile(jsonPath, JSON.stringify(json, null, 2) + "\n");
85-
const { code } = await new Deno.Command(Deno.execPath(), {
85+
const installProc = await new Deno.Command(Deno.execPath(), {
8686
cwd: dir,
8787
args: ["install"],
8888
}).output();
8989

90-
expect(code).toEqual(0);
90+
if (installProc.code !== 0) {
91+
const { stderr, stdout } = getStdOutput(installProc);
92+
// deno-lint-ignore no-console
93+
console.log(stderr);
94+
// deno-lint-ignore no-console
95+
console.log(stdout);
96+
}
97+
98+
expect(installProc.code).toEqual(0);
9199
}
92100

93101
async function copyRecursive(

0 commit comments

Comments
 (0)