Skip to content

Commit 70fb06a

Browse files
committed
doc: clarify assert.fail doc
PR-URL: #4186 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Klauke <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
1 parent e3187cc commit 70fb06a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/assert.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ Tests shallow, coercive equality with the equal comparison operator ( `==` ).
6262

6363
## assert.fail(actual, expected, message, operator)
6464

65-
Throws an exception that displays the values for `actual` and `expected`
66-
separated by the provided operator.
65+
Throws an `AssertionError`. If `message` is falsy, it displays the values for
66+
`actual` and `expected` separated by the provided `operator`. Otherwise, it
67+
displays `message` (and does not use `actual`, `expected`, and `operator`).
6768

6869
## assert.ifError(value)
6970

0 commit comments

Comments
 (0)