summaryrefslogtreecommitdiff
path: root/test/README.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-12-21 10:15:42 -0800
committerRich Trott <rtrott@gmail.com>2016-12-23 13:46:35 -0800
commit9cfeccec4506f9a3c3cbd394db90f8fc1691b392 (patch)
treee1fc8acd1503d19f9a3dc5daa5db41e6ce243c82 /test/README.md
parenta5103ce4b5896a0d7c1a1f99fa3ec6b46a2241a3 (diff)
downloadandroid-node-v8-9cfeccec4506f9a3c3cbd394db90f8fc1691b392.tar.gz
android-node-v8-9cfeccec4506f9a3c3cbd394db90f8fc1691b392.tar.bz2
android-node-v8-9cfeccec4506f9a3c3cbd394db90f8fc1691b392.zip
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>
Diffstat (limited to 'test/README.md')
-rw-r--r--test/README.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/README.md b/test/README.md
index 1c3303435d..8d8cec4491 100644
--- a/test/README.md
+++ b/test/README.md
@@ -290,8 +290,11 @@ Array of IPV6 hosts.
### mustCall(fn[, expected])
* fn [&lt;Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
* expected [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = 1
+* return [&lt;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` [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type)