mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
doc: improve common.mustCall() explanation
PR-URL: https://github.com/nodejs/node/pull/10390 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Julian Duque <julianduquej@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
826decf8e5
commit
8a9d68ad7c
1 file changed
+4
-1
+4
-1
@@ -290,8 +290,11 @@ Array of IPV6 hosts.
|
||||
### mustCall(fn[, expected])
|
||||
* fn [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
|
||||
* expected [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = 1
|
||||
* return [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
|
||||
|
||||
Number of times `fn` should be called.
|
||||
Returns a function that calls `fn`. If the returned function has not been called
|
||||
exactly `expected` number of times when the test is complete, then the test will
|
||||
fail.
|
||||
|
||||
### nodeProcessAborted(exitCode, signal)
|
||||
* `exitCode` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type)
|
||||
|
||||
Reference in new issue
Block a user