Commit 0f900405 authored by Ruben Bridgewater's avatar Ruben Bridgewater Committed by Rich Trott
Browse files

doc: update assert's validation functions

Using `assert.throws()` or `assert.rejects()` in combination with
validation function can be very powerful. Using them by returning
any value besides `true` makes debugging very difficult though
because there's no context or reason why the error validation failed.
Thus, it is recommended to throw an error in such cases instead of
returning anything besides `true`.

PR-URL: https://github.com/nodejs/node/pull/27781


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent 1a0fd602
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment