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(/(?