summaryrefslogtreecommitdiff
path: root/doc/api/assert.md
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-01-15 23:37:09 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-01-16 19:57:36 +0100
commitd07c6f9739360954e8e6c6f16bf061a7f64bda9c (patch)
treec842de376eb55a95a24a990d09bb7d010f13a1ff /doc/api/assert.md
parentf76ef504326f8a37cdb0d3dae705239d685abffc (diff)
downloadandroid-node-v8-d07c6f9739360954e8e6c6f16bf061a7f64bda9c.tar.gz
android-node-v8-d07c6f9739360954e8e6c6f16bf061a7f64bda9c.tar.bz2
android-node-v8-d07c6f9739360954e8e6c6f16bf061a7f64bda9c.zip
assert: throw without args in ok
`assert.ok()` should always receive a value. Otherwise there might be a bug or it was intended to use `assert.fail()`. PR-URL: https://github.com/nodejs/node/pull/17581 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ron Korving <ron@ronkorving.nl>
Diffstat (limited to 'doc/api/assert.md')
-rw-r--r--doc/api/assert.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/assert.md b/doc/api/assert.md
index f3202c214b..efc0f4e078 100644
--- a/doc/api/assert.md
+++ b/doc/api/assert.md
@@ -645,6 +645,11 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the
## assert.ok(value[, message])
<!-- YAML
added: v0.1.21
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/17581
+ description: assert.ok() will throw a `ERR_MISSING_ARGS` error.
+ Use assert.fail() instead.
-->
* `value` {any}
* `message` {any}