From 10313b3d7d96f435bff7696a8c82541dd7e3d2f1 Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Wed, 20 Apr 2022 04:24:49 +0800 Subject: [PATCH] doc: fix example in assert.md --- 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 991275969c4193..8fdbdf383dccce 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -2155,7 +2155,7 @@ assert.throws( ); // Using regular expressions to validate error properties: -throws( +assert.throws( () => { throw err; }, @@ -2179,7 +2179,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`. @@ -2224,7 +2224,7 @@ assert.throws( ); // Using regular expressions to validate error properties: -throws( +assert.throws( () => { throw err; }, @@ -2248,7 +2248,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`.