| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ lenient legacy mode. | |||
| 15 | 15 | Indicates the failure of an assertion. All errors thrown by the `assert` module | |
| 16 | 16 | will be instances of the `AssertionError` class. | |
| 17 | 17 | ||
| 18 | - ### new assert.AssertionError(options) | ||
| 18 | + ### `new assert.AssertionError(options)` | ||
| 19 | 19 | <!-- YAML | |
| 20 | 20 | added: v0.1.21 | |
| 21 | 21 | --> | |
@@ -146,7 +146,7 @@ lax: | |||
| 146 | 146 | assert.deepEqual(/a/gi, new Date()); | |
| 147 | 147 | ``` | |
| 148 | 148 | ||
| 149 | - ## assert(value\[, message\]) | ||
| 149 | + ## `assert(value[, message])` | ||
| 150 | 150 | <!-- YAML | |
| 151 | 151 | added: v0.5.9 | |
| 152 | 152 | --> | |
@@ -156,7 +156,7 @@ added: v0.5.9 | |||
| 156 | 156 | ||
| 157 | 157 | An alias of [`assert.ok()`][]. | |
| 158 | 158 | ||
| 159 | - ## assert.deepEqual(actual, expected\[, message\]) | ||
| 159 | + ## `assert.deepEqual(actual, expected[, message])` | ||
| 160 | 160 | <!-- YAML | |
| 161 | 161 | added: v0.1.21 | |
| 162 | 162 | changes: | |
@@ -270,7 +270,7 @@ parameter is undefined, a default error message is assigned. If the `message` | |||
| 270 | 270 | parameter is an instance of an [`Error`][] then it will be thrown instead of the | |
| 271 | 271 | `AssertionError`. | |
| 272 | 272 | ||
| 273 | - ## assert.deepStrictEqual(actual, expected\[, message\]) | ||
| 273 | + ## `assert.deepStrictEqual(actual, expected[, message])` | ||
| 274 | 274 | <!-- YAML | |
| 275 | 275 | added: v1.2.0 | |
| 276 | 276 | changes: | |
@@ -424,7 +424,7 @@ parameter is undefined, a default error message is assigned. If the `message` | |||
| 424 | 424 | parameter is an instance of an [`Error`][] then it will be thrown instead of the | |
| 425 | 425 | `AssertionError`. | |
| 426 | 426 | ||
| 427 | - ## assert.doesNotReject(asyncFn\[, error\]\[, message\]) | ||
| 427 | + ## `assert.doesNotReject(asyncFn[, error][, message])` | ||
| 428 | 428 | <!-- YAML | |
| 429 | 429 | added: v10.0.0 | |
| 430 | 430 | --> | |
@@ -474,7 +474,7 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) | |||
| 474 | 474 | }); | |
| 475 | 475 | ``` | |
| 476 | 476 | ||
| 477 | - ## assert.doesNotThrow(fn\[, error\]\[, message\]) | ||
| 477 | + ## `assert.doesNotThrow(fn[, error][, message])` | ||
| 478 | 478 | <!-- YAML | |
| 479 | 479 | added: v0.1.21 | |
| 480 | 480 | changes: | |
@@ -550,7 +550,7 @@ assert.doesNotThrow( | |||
| 550 | 550 | // Throws: AssertionError: Got unwanted exception: Whoops | |
| 551 | 551 | ``` | |
| 552 | 552 | ||
| 553 | - ## assert.equal(actual, expected\[, message\]) | ||
| 553 | + ## `assert.equal(actual, expected[, message])` | ||
| 554 | 554 | <!-- YAML | |
| 555 | 555 | added: v0.1.21 | |
| 556 | 556 | --> | |
@@ -590,7 +590,7 @@ parameter is undefined, a default error message is assigned. If the `message` | |||
| 590 | 590 | parameter is an instance of an [`Error`][] then it will be thrown instead of the | |
| 591 | 591 | `AssertionError`. | |
| 592 | 592 | ||
| 593 | - ## assert.fail(\[message\]) | ||
| 593 | + ## `assert.fail([message])` | ||
| 594 | 594 | <!-- YAML | |
| 595 | 595 | added: v0.1.21 | |
| 596 | 596 | --> | |
@@ -617,7 +617,7 @@ assert.fail(new TypeError('need array')); | |||
| 617 | 617 | Using `assert.fail()` with more than two arguments is possible but deprecated. | |
| 618 | 618 | See below for further details. | |
| 619 | 619 | ||
| 620 | - ## assert.fail(actual, expected\[, message\[, operator\[, stackStartFn\]\]\]) | ||
| 620 | + ## `assert.fail(actual, expected[, message[, operator[, stackStartFn]]])` | ||
| 621 | 621 | <!-- YAML | |
| 622 | 622 | added: v0.1.21 | |
| 623 | 623 | changes: | |
@@ -680,7 +680,7 @@ suppressFrame(); | |||
| 680 | 680 | // ... | |
| 681 | 681 | ``` | |
| 682 | 682 | ||
| 683 | - ## assert.ifError(value) | ||
| 683 | + ## `assert.ifError(value)` | ||
| 684 | 684 | <!-- YAML | |
| 685 | 685 | added: v0.1.97 | |
| 686 | 686 | changes: | |
@@ -727,7 +727,7 @@ let err; | |||
| 727 | 727 | // at errorFrame | |
| 728 | 728 | ``` | |
| 729 | 729 | ||
| 730 | - ## assert.notDeepEqual(actual, expected\[, message\]) | ||
| 730 | + ## `assert.notDeepEqual(actual, expected[, message])` | ||
| 731 | 731 | <!-- YAML | |
| 732 | 732 | added: v0.1.21 | |
| 733 | 733 | changes: | |
@@ -801,7 +801,7 @@ parameter is undefined, a default error message is assigned. If the `message` | |||
| 801 | 801 | parameter is an instance of an [`Error`][] then it will be thrown instead of the | |
| 802 | 802 | `AssertionError`. | |
| 803 | 803 | ||
| 804 | - ## assert.notDeepStrictEqual(actual, expected\[, message\]) | ||
| 804 | + ## `assert.notDeepStrictEqual(actual, expected[, message])` | ||
| 805 | 805 | <!-- YAML | |
| 806 | 806 | added: v1.2.0 | |
| 807 | 807 | changes: | |
@@ -849,7 +849,7 @@ a `message` property set equal to the value of the `message` parameter. If the | |||
| 849 | 849 | `message` parameter is an instance of an [`Error`][] then it will be thrown | |
| 850 | 850 | instead of the `AssertionError`. | |
| 851 | 851 | ||
| 852 | - ## assert.notEqual(actual, expected\[, message\]) | ||
| 852 | + ## `assert.notEqual(actual, expected[, message])` | ||
| 853 | 853 | <!-- YAML | |
| 854 | 854 | added: v0.1.21 | |
| 855 | 855 | --> | |
@@ -888,7 +888,7 @@ undefined, a default error message is assigned. If the `message` parameter is an | |||
| 888 | 888 | instance of an [`Error`][] then it will be thrown instead of the | |
| 889 | 889 | `AssertionError`. | |
| 890 | 890 | ||
| 891 | - ## assert.notStrictEqual(actual, expected\[, message\]) | ||
| 891 | + ## `assert.notStrictEqual(actual, expected[, message])` | ||
| 892 | 892 | <!-- YAML | |
| 893 | 893 | added: v0.1.21 | |
| 894 | 894 | changes: | |
@@ -925,7 +925,7 @@ parameter is undefined, a default error message is assigned. If the `message` | |||
| 925 | 925 | parameter is an instance of an [`Error`][] then it will be thrown instead of the | |
| 926 | 926 | `AssertionError`. | |
| 927 | 927 | ||
| 928 | - ## assert.ok(value\[, message\]) | ||
| 928 | + ## `assert.ok(value[, message])` | ||
| 929 | 929 | <!-- YAML | |
| 930 | 930 | added: v0.1.21 | |
| 931 | 931 | changes: | |
@@ -993,7 +993,7 @@ assert(0); | |||
| 993 | 993 | // assert(0) | |
| 994 | 994 | ``` | |
| 995 | 995 | ||
| 996 | - ## assert.rejects(asyncFn\[, error\]\[, message\]) | ||
| 996 | + ## `assert.rejects(asyncFn[, error][, message])` | ||
| 997 | 997 | <!-- YAML | |
| 998 | 998 | added: v10.0.0 | |
| 999 | 999 | --> | |
@@ -1052,7 +1052,7 @@ argument, then `error` is assumed to be omitted and the string will be used for | |||
| 1052 | 1052 | example in [`assert.throws()`][] carefully if using a string as the second | |
| 1053 | 1053 | argument gets considered. | |
| 1054 | 1054 | ||
| 1055 | - ## assert.strictEqual(actual, expected\[, message\]) | ||
| 1055 | + ## `assert.strictEqual(actual, expected[, message])` | ||
| 1056 | 1056 | <!-- YAML | |
| 1057 | 1057 | added: v0.1.21 | |
| 1058 | 1058 | changes: | |
@@ -1102,7 +1102,7 @@ If the values are not strictly equal, an `AssertionError` is thrown with a | |||
| 1102 | 1102 | `message` parameter is an instance of an [`Error`][] then it will be thrown | |
| 1103 | 1103 | instead of the `AssertionError`. | |
| 1104 | 1104 | ||
| 1105 | - ## assert.throws(fn\[, error\]\[, message\]) | ||
| 1105 | + ## `assert.throws(fn[, error][, message])` | ||
| 1106 | 1106 | <!-- YAML | |
| 1107 | 1107 | added: v0.1.21 | |
| 1108 | 1108 | changes: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments