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 targos committed Apr 28, 2022
1 parent 6225370 commit c32f76d
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 @@ -2155,7 +2155,7 @@ assert.throws(
);

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

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

0 comments on commit c32f76d

Please sign in to comment.