Skip to content

Commit 47cdebe

Browse files
debugging
1 parent 5fd3d69 commit 47cdebe

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/test_utils.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,25 @@ export async function withChildProcessServer(
148148
throw new Error(`Could not find server address`);
149149
}
150150

151+
let failed = false;
151152
try {
152153
await fn(address);
153154
} catch (err) {
154155
// deno-lint-ignore no-console
155156
console.log(output);
157+
failed = true;
156158
throw err;
157159
} finally {
158160
aborter.abort();
159161
await cp.status;
160-
for await (const _ of lines) { /* noop */ }
162+
for await (const line of lines) {
163+
output.push(line);
164+
}
165+
166+
if (failed) {
167+
// deno-lint-ignore no-console
168+
console.log(output);
169+
}
161170
}
162171
}
163172

0 commit comments

Comments
 (0)