From d7eeee90e8d6dc38e6fd83ddc9d127a81235e438 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 7 Dec 2015 19:03:21 -0800 Subject: [PATCH] doc: clarify assert.fail doc --- doc/api/assert.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/assert.markdown b/doc/api/assert.markdown index c35fc1ad0832a0..a3fb229161b31e 100644 --- a/doc/api/assert.markdown +++ b/doc/api/assert.markdown @@ -62,8 +62,9 @@ Tests shallow, coercive equality with the equal comparison operator ( `==` ). ## assert.fail(actual, expected, message, operator) -Throws an exception that displays the values for `actual` and `expected` -separated by the provided operator. +Throws an `AssertionError`. If `message` is falsy, it displays the values for +`actual` and `expected` separated by the provided `operator`. Otherwise, it +displays `message` (and does not use `actual`, `expected`, and `operator`). ## assert.ifError(value)