From b3de5832ab242fd18400aa9540810e8c0c5bfa3e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 31 May 2017 22:26:55 -0700 Subject: [PATCH] test: add documentation for common.mustNotCall() --- test/common/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/common/README.md b/test/common/README.md index 492b5acdea586c..01d19116bdac29 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -204,6 +204,12 @@ fail. If `fn` is not provided, `common.noop` will be used. +### mustNotCall([msg]) +* `msg` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) default = 'function should not have been called' +* return [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) + +Returns a function that triggers an `AssertionError` if it is invoked. `msg` is used as the error message for the `AssertionError`. + ### nodeProcessAborted(exitCode, signal) * `exitCode` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) * `signal` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)