From 4d5ef4f7afb256b4b356b2b097214bb80611e50d 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 2516feea9877a2..111fb2a6440e83 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -606,7 +606,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'); @@ -625,7 +625,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(); }); ``` @@ -653,7 +653,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');