Skip to content

Commit 4d5ef4f

Browse files
mleenhardtmarco-ippolito
authored andcommitted
doc: fix info string causing duplicated code blocks
Two fenced code blocks were incorrectly labeled as `js` instead of `cjs`, causing both ESM and CJS version to be shown on https://nodejs.org/api/test.html#timers instead of being conditionally shown depending on the value of the "CJS / ESM" toggle. PR-URL: #52660 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 6826bbf commit 4d5ef4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/test.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
606606
});
607607
```
608608

609-
```js
609+
```cjs
610610
const assert = require('node:assert');
611611
const { mock, test } = require('node:test');
612612

@@ -625,7 +625,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
625625
// Reset the globally tracked mocks.
626626
mock.timers.reset();
627627

628-
// If you call reset mock instance, it'll also reset timers instance
628+
// If you call reset mock instance, it will also reset timers instance
629629
mock.reset();
630630
});
631631
```
@@ -653,7 +653,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
653653
});
654654
```
655655

656-
```js
656+
```cjs
657657
const assert = require('node:assert');
658658
const { test } = require('node:test');
659659

0 commit comments

Comments
 (0)