Skip to content

Commit 91dc8c9

Browse files
authored
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: nodejs#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 cdd03ef commit 91dc8c9

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
@@ -641,7 +641,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
641641
});
642642
```
643643

644-
```js
644+
```cjs
645645
const assert = require('node:assert');
646646
const { mock, test } = require('node:test');
647647

@@ -660,7 +660,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
660660
// Reset the globally tracked mocks.
661661
mock.timers.reset();
662662

663-
// If you call reset mock instance, it'll also reset timers instance
663+
// If you call reset mock instance, it will also reset timers instance
664664
mock.reset();
665665
});
666666
```
@@ -688,7 +688,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
688688
});
689689
```
690690

691-
```js
691+
```cjs
692692
const assert = require('node:assert');
693693
const { test } = require('node:test');
694694

0 commit comments

Comments
 (0)