From 84e70ec8def5818e306f87deed96455f7a7c4f01 Mon Sep 17 00:00:00 2001 From: Livia Medeiros <74449973+LiviaMedeiros@users.noreply.github.com> Date: Fri, 22 Apr 2022 00:18:22 +0800 Subject: [PATCH] doc: fix example in assert.md PR-URL: https://github.com/nodejs/node/pull/42786 Reviewed-By: Rich Trott Reviewed-By: Beth Griggs Reviewed-By: Colin Ihrig Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Akhil Marsonya Reviewed-By: Luigi Pinca Reviewed-By: Mestery Reviewed-By: Harshitha K P Reviewed-By: Darshan Sen Reviewed-By: James M Snell --- doc/api/assert.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index 11ee21c0ea2..7c9f8684d06 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -2137,7 +2137,7 @@ assert.throws( ); // Using regular expressions to validate error properties: -throws( +assert.throws( () => { throw err; }, @@ -2161,7 +2161,7 @@ throws( ); // Fails due to the different `message` and `name` properties: -throws( +assert.throws( () => { const otherErr = new Error('Not found'); // Copy all enumerable properties from `err` to `otherErr`. @@ -2206,7 +2206,7 @@ assert.throws( ); // Using regular expressions to validate error properties: -throws( +assert.throws( () => { throw err; }, @@ -2230,7 +2230,7 @@ throws( ); // Fails due to the different `message` and `name` properties: -throws( +assert.throws( () => { const otherErr = new Error('Not found'); // Copy all enumerable properties from `err` to `otherErr`.