diff --git a/reporter/console-cli.ts b/reporter/console-cli.ts index bf7229d..70bc001 100644 --- a/reporter/console-cli.ts +++ b/reporter/console-cli.ts @@ -1,5 +1,11 @@ import { consoleReporter } from './consoleReporter.js' +const chunks: string[] = [] + process.stdin.on('data', (data) => { - consoleReporter(JSON.parse(data.toString()), console.log) + chunks.push(data.toString()) +}) + +process.stdin.on('end', () => { + consoleReporter(JSON.parse(chunks.join('')), console.log) }) diff --git a/reporter/markdown-cli.ts b/reporter/markdown-cli.ts index 287401d..51e51f7 100644 --- a/reporter/markdown-cli.ts +++ b/reporter/markdown-cli.ts @@ -1,5 +1,11 @@ import { markdownReporter } from './markdownReporter.js' +const chunks: string[] = [] + process.stdin.on('data', (data) => { - console.log(markdownReporter(JSON.parse(data.toString()))) + chunks.push(data.toString()) +}) + +process.stdin.on('end', () => { + console.log(markdownReporter(JSON.parse(chunks.join('')))) })