Skip to content

Commit 29f19b6

Browse files
Trottjasnell
authored andcommitted
test: add documentation for common.mustNotCall()
PR-URL: #13359 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: David Cai <[email protected]>
1 parent 11e428d commit 29f19b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/common/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ fail.
204204

205205
If `fn` is not provided, `common.noop` will be used.
206206

207+
### mustNotCall([msg])
208+
* `msg` [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) default = 'function should not have been called'
209+
* return [&lt;Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
210+
211+
Returns a function that triggers an `AssertionError` if it is invoked. `msg` is used as the error message for the `AssertionError`.
212+
207213
### nodeProcessAborted(exitCode, signal)
208214
* `exitCode` [&lt;Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type)
209215
* `signal` [&lt;String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type)

0 commit comments

Comments
 (0)