From a29f09027dbf2547eb44c3337a11a5ccda139d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Mon, 12 May 2025 10:36:41 +0200 Subject: [PATCH] test: output client logs on test failure --- test/commands/start.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/commands/start.test.ts b/test/commands/start.test.ts index 3d18ffc..fd22ff1 100644 --- a/test/commands/start.test.ts +++ b/test/commands/start.test.ts @@ -12,7 +12,7 @@ import { deleteNetwork, findContainer } from '../utils/docker' chaiUse(chaiAsPromised) let testFailed = false -async function runCommand(args: string): Promise> { +async function runCommand (args: string): Promise> { const result = await runCommandRaw(args) if (result.error) { @@ -72,7 +72,9 @@ describe('start command', () => { const containers = await docker.listContainers() for (const c of containers) console.log(` - ${c.Names.join(', ')}`) - await runCommand('logs client') + const { stdout } = await runCommand('logs client') + console.log('Client logs:\n', stdout) + } await runCommand('stop')