doc: improve assert documentation by BridgeAR · Pull Request #22692 · nodejs/node
This fixes the officially accepted message types for assert.throws(),
assert.rejects(), assert.doesNotThrow() and
assert.doesNotReject(). It also renames the block argument in
those functions to fn and promiseFn for further clarity.
Errors would be ambiguous and were never intended to be special
handled as message. They are "accepted" in case it's the third argument
by coercing those to a string.
Checklist
-
make -j4 test(UNIX), orvcbuild test(Windows) passes - tests and/or benchmarks are included
- documentation is changed or added
- commit message follows commit guidelines