From bcdee3b2826539c9b961d52364b1dd0816a096fd Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Mon, 24 Jun 2024 17:43:56 -0300 Subject: [PATCH] fix: print test:stdout and test:stderr's messages (#17) --- lib/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index 5a0b5ff..9f45beb 100644 --- a/lib/main.js +++ b/lib/main.js @@ -28,7 +28,9 @@ export default async function * customReporter (source) { type !== 'test:pass' && type !== 'test:fail' && type !== 'test:plan' && - type !== 'test:diagnostic' + type !== 'test:diagnostic' && + type !== 'test:stdout' && + type !== 'test:stderr' ) { continue; } @@ -111,6 +113,12 @@ export default async function * customReporter (source) { // Emitted when context.diagnostic is called. diagnostics.push(data); break; + case 'test:stdout': + process.stdout.write(data.message); + break; + case 'test:stderr': + process.stderr.write(data.message); + break; } }