From 5bdf9809ca0e503ab0737c641134504fb7545e7e Mon Sep 17 00:00:00 2001 From: Mathieu Leenhardt Date: Wed, 24 Apr 2024 01:00:24 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/52660 Reviewed-By: Xuguang Mei Reviewed-By: Moshe Atlow Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel --- doc/api/test.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 82225f10929805f..741166e130a9e1b 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -641,7 +641,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w }); ``` -```js +```cjs const assert = require('node:assert'); const { mock, test } = require('node:test'); @@ -660,7 +660,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w // Reset the globally tracked mocks. mock.timers.reset(); - // If you call reset mock instance, it'll also reset timers instance + // If you call reset mock instance, it will also reset timers instance mock.reset(); }); ``` @@ -688,7 +688,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w }); ``` -```js +```cjs const assert = require('node:assert'); const { test } = require('node:test');