Skip to content

Commit 90c6e77

Browse files
mleenhardtaduh95
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 <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 4baeb7b commit 90c6e77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/test.md

Lines changed: 3 additions & 3 deletions
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)