Skip to content

Commit 4087825

Browse files
TrottMylesBorins
authored andcommitted
doc,assert: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 88cdc51 commit 4087825

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

doc/api/assert.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ lenient legacy mode.
1515
Indicates the failure of an assertion. All errors thrown by the `assert` module
1616
will be instances of the `AssertionError` class.
1717

18-
### new assert.AssertionError(options)
18+
### `new assert.AssertionError(options)`
1919
<!-- YAML
2020
added: v0.1.21
2121
-->
@@ -146,7 +146,7 @@ lax:
146146
assert.deepEqual(/a/gi, new Date());
147147
```
148148

149-
## assert(value\[, message\])
149+
## `assert(value[, message])`
150150
<!-- YAML
151151
added: v0.5.9
152152
-->
@@ -156,7 +156,7 @@ added: v0.5.9
156156

157157
An alias of [`assert.ok()`][].
158158

159-
## assert.deepEqual(actual, expected\[, message\])
159+
## `assert.deepEqual(actual, expected[, message])`
160160
<!-- YAML
161161
added: v0.1.21
162162
changes:
@@ -270,7 +270,7 @@ parameter is undefined, a default error message is assigned. If the `message`
270270
parameter is an instance of an [`Error`][] then it will be thrown instead of the
271271
`AssertionError`.
272272

273-
## assert.deepStrictEqual(actual, expected\[, message\])
273+
## `assert.deepStrictEqual(actual, expected[, message])`
274274
<!-- YAML
275275
added: v1.2.0
276276
changes:
@@ -424,7 +424,7 @@ parameter is undefined, a default error message is assigned. If the `message`
424424
parameter is an instance of an [`Error`][] then it will be thrown instead of the
425425
`AssertionError`.
426426

427-
## assert.doesNotReject(asyncFn\[, error\]\[, message\])
427+
## `assert.doesNotReject(asyncFn[, error][, message])`
428428
<!-- YAML
429429
added: v10.0.0
430430
-->
@@ -474,7 +474,7 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
474474
});
475475
```
476476

477-
## assert.doesNotThrow(fn\[, error\]\[, message\])
477+
## `assert.doesNotThrow(fn[, error][, message])`
478478
<!-- YAML
479479
added: v0.1.21
480480
changes:
@@ -550,7 +550,7 @@ assert.doesNotThrow(
550550
// Throws: AssertionError: Got unwanted exception: Whoops
551551
```
552552

553-
## assert.equal(actual, expected\[, message\])
553+
## `assert.equal(actual, expected[, message])`
554554
<!-- YAML
555555
added: v0.1.21
556556
-->
@@ -590,7 +590,7 @@ parameter is undefined, a default error message is assigned. If the `message`
590590
parameter is an instance of an [`Error`][] then it will be thrown instead of the
591591
`AssertionError`.
592592

593-
## assert.fail(\[message\])
593+
## `assert.fail([message])`
594594
<!-- YAML
595595
added: v0.1.21
596596
-->
@@ -617,7 +617,7 @@ assert.fail(new TypeError('need array'));
617617
Using `assert.fail()` with more than two arguments is possible but deprecated.
618618
See below for further details.
619619

620-
## assert.fail(actual, expected\[, message\[, operator\[, stackStartFn\]\]\])
620+
## `assert.fail(actual, expected[, message[, operator[, stackStartFn]]])`
621621
<!-- YAML
622622
added: v0.1.21
623623
changes:
@@ -680,7 +680,7 @@ suppressFrame();
680680
// ...
681681
```
682682

683-
## assert.ifError(value)
683+
## `assert.ifError(value)`
684684
<!-- YAML
685685
added: v0.1.97
686686
changes:
@@ -727,7 +727,7 @@ let err;
727727
// at errorFrame
728728
```
729729

730-
## assert.notDeepEqual(actual, expected\[, message\])
730+
## `assert.notDeepEqual(actual, expected[, message])`
731731
<!-- YAML
732732
added: v0.1.21
733733
changes:
@@ -801,7 +801,7 @@ parameter is undefined, a default error message is assigned. If the `message`
801801
parameter is an instance of an [`Error`][] then it will be thrown instead of the
802802
`AssertionError`.
803803

804-
## assert.notDeepStrictEqual(actual, expected\[, message\])
804+
## `assert.notDeepStrictEqual(actual, expected[, message])`
805805
<!-- YAML
806806
added: v1.2.0
807807
changes:
@@ -849,7 +849,7 @@ a `message` property set equal to the value of the `message` parameter. If the
849849
`message` parameter is an instance of an [`Error`][] then it will be thrown
850850
instead of the `AssertionError`.
851851

852-
## assert.notEqual(actual, expected\[, message\])
852+
## `assert.notEqual(actual, expected[, message])`
853853
<!-- YAML
854854
added: v0.1.21
855855
-->
@@ -888,7 +888,7 @@ undefined, a default error message is assigned. If the `message` parameter is an
888888
instance of an [`Error`][] then it will be thrown instead of the
889889
`AssertionError`.
890890

891-
## assert.notStrictEqual(actual, expected\[, message\])
891+
## `assert.notStrictEqual(actual, expected[, message])`
892892
<!-- YAML
893893
added: v0.1.21
894894
changes:
@@ -925,7 +925,7 @@ parameter is undefined, a default error message is assigned. If the `message`
925925
parameter is an instance of an [`Error`][] then it will be thrown instead of the
926926
`AssertionError`.
927927

928-
## assert.ok(value\[, message\])
928+
## `assert.ok(value[, message])`
929929
<!-- YAML
930930
added: v0.1.21
931931
changes:
@@ -993,7 +993,7 @@ assert(0);
993993
// assert(0)
994994
```
995995

996-
## assert.rejects(asyncFn\[, error\]\[, message\])
996+
## `assert.rejects(asyncFn[, error][, message])`
997997
<!-- YAML
998998
added: v10.0.0
999999
-->
@@ -1052,7 +1052,7 @@ argument, then `error` is assumed to be omitted and the string will be used for
10521052
example in [`assert.throws()`][] carefully if using a string as the second
10531053
argument gets considered.
10541054

1055-
## assert.strictEqual(actual, expected\[, message\])
1055+
## `assert.strictEqual(actual, expected[, message])`
10561056
<!-- YAML
10571057
added: v0.1.21
10581058
changes:
@@ -1102,7 +1102,7 @@ If the values are not strictly equal, an `AssertionError` is thrown with a
11021102
`message` parameter is an instance of an [`Error`][] then it will be thrown
11031103
instead of the `AssertionError`.
11041104

1105-
## assert.throws(fn\[, error\]\[, message\])
1105+
## `assert.throws(fn[, error][, message])`
11061106
<!-- YAML
11071107
added: v0.1.21
11081108
changes:

0 commit comments

Comments
 (0)