From f8f7a7ce093afe1fc7184b300b4ee472052f987e Mon Sep 17 00:00:00 2001 From: Yusuke Sakurai Date: Mon, 19 Feb 2024 22:32:03 +0900 Subject: [PATCH] merge --- src/watch.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/watch.ts b/src/watch.ts index bcd2039f..b0c811e3 100644 --- a/src/watch.ts +++ b/src/watch.ts @@ -346,10 +346,23 @@ export function syncTestStatusToVsCode( ) { const groups = groupTasksByPattern(new Map(), vscodeFile.children, vitestFile.tasks) for (const [data, tasks] of groups.entries()) { + if (finished) { + for (const task of tasks) { + if (!task.logs) + continue + // for now, display logs after all tests are finished. + // TODO: append logs during test execution using `onUserConsoleLog` rpc. + for (const log of task.logs) { + // LF to CRLF https://code.visualstudio.com/api/extension-guides/testing#test-output + const output = log.content.replace(/(?