diff options
author | Livia Medeiros <74449973+LiviaMedeiros@users.noreply.github.com> | 2022-04-21 19:18:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 19:18:22 +0300 |
commit | a2d86f6009dd0a33830ecf0677d69e1f181aea26 (patch) | |
tree | 246f599ec7e27e7bc99ff9729f4326d4d1050b34 | |
parent | fe85cf70a2c16123bb109c213cc17cdcf541e38f (diff) |
doc: fix example in assert.md
PR-URL: https://github.com/nodejs/node/pull/42786
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | doc/api/assert.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md index da9a4ba5582..cc711959857 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`. |