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>
This commit is contained in:
Livia Medeiros authored and Michaël Zasso committed 2022-07-31 09:43:53 +02:00
1 parent 6e8285a27b
commit b5cac3a4b7
1 file changed
+4 -4
+4 -4
View File
@@ -2137,7 +2137,7 @@ assert.throws(
);
// Using regular expressions to validate error properties:
throws(
assert.throws(
() => {
throw err;
},
@@ -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`.
@@ -2206,7 +2206,7 @@ assert.throws(
);
// Using regular expressions to validate error properties:
throws(
assert.throws(
() => {
throw err;
},
@@ -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`.