Skip to content

Commit

Permalink
doc: add missing new lines to custom test reporter examples
Browse files Browse the repository at this point in the history
PR-URL: #54152
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
  • Loading branch information
EddieAbbondanzio authored and targos committed Aug 14, 2024
1 parent 9ee4b16 commit db3b0df
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,13 +1134,13 @@ export default async function * customReporter(source) {
for await (const event of source) {
switch (event.type) {
case 'test:dequeue':
yield `test ${event.data.name} dequeued`;
yield `test ${event.data.name} dequeued\n`;
break;
case 'test:enqueue':
yield `test ${event.data.name} enqueued`;
yield `test ${event.data.name} enqueued\n`;
break;
case 'test:watch:drained':
yield 'test watch queue drained';
yield 'test watch queue drained\n';
break;
case 'test:start':
yield `test ${event.data.name} started\n`;
Expand All @@ -1152,7 +1152,7 @@ export default async function * customReporter(source) {
yield `test ${event.data.name} failed\n`;
break;
case 'test:plan':
yield 'test plan';
yield 'test plan\n';
break;
case 'test:diagnostic':
case 'test:stderr':
Expand All @@ -1174,13 +1174,13 @@ module.exports = async function * customReporter(source) {
for await (const event of source) {
switch (event.type) {
case 'test:dequeue':
yield `test ${event.data.name} dequeued`;
yield `test ${event.data.name} dequeued\n`;
break;
case 'test:enqueue':
yield `test ${event.data.name} enqueued`;
yield `test ${event.data.name} enqueued\n`;
break;
case 'test:watch:drained':
yield 'test watch queue drained';
yield 'test watch queue drained\n';
break;
case 'test:start':
yield `test ${event.data.name} started\n`;
Expand Down

0 comments on commit db3b0df

Please sign in to comment.