test: add documentation for common.mustNotCall()
PR-URL: https://github.com/nodejs/node/pull/13359 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Cai <davidcai1993@yahoo.com>
This commit is contained in:
parent
917f86ea35
commit
163c0780ea
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user