Skip to content

Commit

Permalink
doc: fix example in assert.md
Browse files Browse the repository at this point in the history
PR-URL: #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 juanarbol committed May 31, 2022
1 parent 3591ec7 commit e53a925
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 e53a925

Please sign in to comment.