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)