Skip to content

Commit 118df63

Browse files
TrottBridgeAR
authored andcommitted
doc,assert: use code markup/markdown in headers
PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent ff82890 commit 118df63

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:
@@ -271,7 +271,7 @@ parameter is undefined, a default error message is assigned. If the `message`
271271
parameter is an instance of an [`Error`][] then it will be thrown instead of the
272272
[`AssertionError`][].
273273

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

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

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

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

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

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

684-
## assert.ifError(value)
684+
## `assert.ifError(value)`
685685
<!-- YAML
686686
added: v0.1.97
687687
changes:
@@ -728,7 +728,7 @@ let err;
728728
// at errorFrame
729729
```
730730

731-
## assert.notDeepEqual(actual, expected\[, message\])
731+
## `assert.notDeepEqual(actual, expected[, message])`
732732
<!-- YAML
733733
added: v0.1.21
734734
changes:
@@ -802,7 +802,7 @@ If the values are deeply equal, an [`AssertionError`][] is thrown with a
802802
`message` parameter is an instance of an [`Error`][] then it will be thrown
803803
instead of the `AssertionError`.
804804

805-
## assert.notDeepStrictEqual(actual, expected\[, message\])
805+
## `assert.notDeepStrictEqual(actual, expected[, message])`
806806
<!-- YAML
807807
added: v1.2.0
808808
changes:
@@ -850,7 +850,7 @@ the `message` parameter is undefined, a default error message is assigned. If
850850
the `message` parameter is an instance of an [`Error`][] then it will be thrown
851851
instead of the [`AssertionError`][].
852852

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

892-
## assert.notStrictEqual(actual, expected\[, message\])
892+
## `assert.notStrictEqual(actual, expected[, message])`
893893
<!-- YAML
894894
added: v0.1.21
895895
changes:
@@ -926,7 +926,7 @@ If the values are strictly equal, an [`AssertionError`][] is thrown with a
926926
`message` parameter is an instance of an [`Error`][] then it will be thrown
927927
instead of the `AssertionError`.
928928

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

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

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

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

0 commit comments

Comments
 (0)