summaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
authorQuinn Langille <quinn@quinnlangille.com>2018-10-12 09:53:59 -0700
committerAnna Henningsen <anna@addaleax.net>2018-10-14 22:13:52 +0200
commit541367ac8e17619f4d11af836f41bc18a789623b (patch)
tree6d6233fd70be521cf6ab949b69a78ef8fd5243ef /test/common
parent8059ff2f0b01a4ee5c9da6c5db6b256f0c4ed42c (diff)
downloadnode-new-541367ac8e17619f4d11af836f41bc18a789623b.tar.gz
test: removed mustCallAsync from common and added inside testcase
PR-URL: https://github.com/nodejs/node/pull/23467 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/common')
-rw-r--r--test/common/README.md11
-rw-r--r--test/common/index.js7
-rw-r--r--test/common/index.mjs2
3 files changed, 0 insertions, 20 deletions
diff --git a/test/common/README.md b/test/common/README.md
index 0a2281b091..63b7905113 100644
--- a/test/common/README.md
+++ b/test/common/README.md
@@ -234,17 +234,6 @@ fail.
If `fn` is not provided, an empty function will be used.
-### mustCallAsync([fn][, exact])
-* `fn` [&lt;Function>]
-* `exact` [&lt;number>] default = 1
-* return [&lt;Function>]
-
-The same as `mustCall()`, except that it is also checked that the Promise
-returned by the function is fulfilled for each invocation of the function.
-
-The return value of the wrapped function is the return value of the original
-function, if necessary wrapped as a promise.
-
### mustCallAtLeast([fn][, minimum])
* `fn` [&lt;Function>] default = () => {}
* `minimum` [&lt;number>] default = 1
diff --git a/test/common/index.js b/test/common/index.js
index 9cbf918969..53977beef5 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -308,12 +308,6 @@ function mustCallAtLeast(fn, minimum) {
return _mustCallInner(fn, minimum, 'minimum');
}
-function mustCallAsync(fn, exact) {
- return mustCall((...args) => {
- return Promise.resolve(fn(...args)).then(mustCall((val) => val));
- }, exact);
-}
-
function _mustCallInner(fn, criteria = 1, field) {
if (process._exiting)
throw new Error('Cannot use common.mustCall*() in process exit handler');
@@ -722,7 +716,6 @@ module.exports = {
isWindows,
localIPv6Hosts,
mustCall,
- mustCallAsync,
mustCallAtLeast,
mustNotCall,
nodeProcessAborted,
diff --git a/test/common/index.mjs b/test/common/index.mjs
index bead7333d1..068dd35049 100644
--- a/test/common/index.mjs
+++ b/test/common/index.mjs
@@ -26,7 +26,6 @@ const {
allowGlobals,
mustCall,
mustCallAtLeast,
- mustCallAsync,
hasMultiLocalhost,
skipIfEslintMissing,
canCreateSymLink,
@@ -74,7 +73,6 @@ export {
allowGlobals,
mustCall,
mustCallAtLeast,
- mustCallAsync,
hasMultiLocalhost,
skipIfEslintMissing,
canCreateSymLink,