Skip to content

Commit

Permalink
doc: fix example in assert.md
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#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>
  • Loading branch information
LiviaMedeiros authored and guangwong committed Oct 10, 2022
1 parent 1b3ddac commit 84e70ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ assert.throws(
);

// Using regular expressions to validate error properties:
throws(
assert.throws(
() => {
throw err;
},
Expand All @@ -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`.
Expand Down Expand Up @@ -2206,7 +2206,7 @@ assert.throws(
);

// Using regular expressions to validate error properties:
throws(
assert.throws(
() => {
throw err;
},
Expand All @@ -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`.
Expand Down

0 comments on commit 84e70ec

Please sign in to comment.