From 5d33812160204dc0c8b2114320ac212fd41e2309 Mon Sep 17 00:00:00 2001
From: Matteo Collina <hello@matteocollina.com>
Date: Tue, 5 Dec 2023 10:37:22 +0100
Subject: [PATCH 1/2] doc: set exit code in custom test runner example

Signed-off-by: Matteo Collina <hello@matteocollina.com>
---
 doc/api/test.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/api/test.md b/doc/api/test.md
index 543982e3c9c4b9..b338e019050070 100644
--- a/doc/api/test.md
+++ b/doc/api/test.md
@@ -1154,6 +1154,9 @@ import process from 'node:process';
 import path from 'node:path';
 
 run({ files: [path.resolve('./tests/test.js')] })
+ .on('test:fail', () => {
+    process.exitCode = 1
+  })
   .compose(tap)
   .pipe(process.stdout);
 ```
@@ -1164,6 +1167,9 @@ const { run } = require('node:test');
 const path = require('node:path');
 
 run({ files: [path.resolve('./tests/test.js')] })
+  .on('test:fail', () => {
+    process.exitCode = 1
+  })
   .compose(tap)
   .pipe(process.stdout);
 ```

From be6094f0bb8731849a9f111f0293615249bedcdc Mon Sep 17 00:00:00 2001
From: Matteo Collina <hello@matteocollina.com>
Date: Tue, 19 Dec 2023 14:33:29 +0100
Subject: [PATCH 2/2] linting

Signed-off-by: Matteo Collina <hello@matteocollina.com>
---
 doc/api/test.md | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/api/test.md b/doc/api/test.md
index b338e019050070..4c97bc6f4cc47d 100644
--- a/doc/api/test.md
+++ b/doc/api/test.md
@@ -1155,10 +1155,10 @@ import path from 'node:path';
 
 run({ files: [path.resolve('./tests/test.js')] })
  .on('test:fail', () => {
-    process.exitCode = 1
-  })
-  .compose(tap)
-  .pipe(process.stdout);
+   process.exitCode = 1;
+ })
+ .compose(tap)
+ .pipe(process.stdout);
 ```
 
 ```cjs
@@ -1167,11 +1167,11 @@ const { run } = require('node:test');
 const path = require('node:path');
 
 run({ files: [path.resolve('./tests/test.js')] })
-  .on('test:fail', () => {
-    process.exitCode = 1
-  })
-  .compose(tap)
-  .pipe(process.stdout);
+ .on('test:fail', () => {
+   process.exitCode = 1;
+ })
+ .compose(tap)
+ .pipe(process.stdout);
 ```
 
 ## `test([name][, options][, fn])`