Skip to content

Commit

Permalink
fix: print test:stdout and test:stderr's messages (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado authored and voxpelli committed Jun 24, 2024
1 parent 3c68133 commit bcdee3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit bcdee3b

Please sign in to comment.