diff --git a/doc/api/assert.md b/doc/api/assert.md index 2aeee28958ff10..c590df9402bdc1 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -15,7 +15,7 @@ lenient legacy mode. Indicates the failure of an assertion. All errors thrown by the `assert` module will be instances of the `AssertionError` class. -### new assert.AssertionError(options) +### `new assert.AssertionError(options)` @@ -146,7 +146,7 @@ lax: assert.deepEqual(/a/gi, new Date()); ``` -## assert(value\[, message\]) +## `assert(value[, message])` @@ -156,7 +156,7 @@ added: v0.5.9 An alias of [`assert.ok()`][]. -## assert.deepEqual(actual, expected\[, message\]) +## `assert.deepEqual(actual, expected[, message])` @@ -474,7 +474,7 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) }); ``` -## assert.doesNotThrow(fn\[, error\]\[, message\]) +## `assert.doesNotThrow(fn[, error][, message])` @@ -590,7 +590,7 @@ parameter is undefined, a default error message is assigned. If the `message` parameter is an instance of an [`Error`][] then it will be thrown instead of the `AssertionError`. -## assert.fail(\[message\]) +## `assert.fail([message])` @@ -617,7 +617,7 @@ assert.fail(new TypeError('need array')); Using `assert.fail()` with more than two arguments is possible but deprecated. See below for further details. -## assert.fail(actual, expected\[, message\[, operator\[, stackStartFn\]\]\]) +## `assert.fail(actual, expected[, message[, operator[, stackStartFn]]])` @@ -888,7 +888,7 @@ undefined, a default error message is assigned. If the `message` parameter is an instance of an [`Error`][] then it will be thrown instead of the `AssertionError`. -## assert.notStrictEqual(actual, expected\[, message\]) +## `assert.notStrictEqual(actual, expected[, message])` @@ -1052,7 +1052,7 @@ argument, then `error` is assumed to be omitted and the string will be used for example in [`assert.throws()`][] carefully if using a string as the second argument gets considered. -## assert.strictEqual(actual, expected\[, message\]) +## `assert.strictEqual(actual, expected[, message])`