-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add missing function to test common doc #11382
Conversation
test/README.md
Outdated
@@ -175,6 +175,13 @@ On non-Windows platforms, this currently returns true. | |||
|
|||
Platform normalizes the `dd` command | |||
|
|||
### expectsError(code[, type[, message]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I know the list is not completely in alphabetical order but can you move this below enoughTestMem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh, yes, definitely, will do!
test/README.md
Outdated
@@ -175,6 +175,13 @@ On non-Windows platforms, this currently returns true. | |||
|
|||
Platform normalizes the `dd` command | |||
|
|||
### expectsError(code[, type[, message]]) | |||
* `code` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) expected error must have this value for its `code` property | |||
* `type` [<constructor>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) expected error must be an instance of `type` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor
is not actually a type...I think this is a Function
and should be noted that it needs to be one that's subclassed by the internal/errors
module? (Maybe a link to the guide here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good suggestions, implementing momentarily, thanks!
test/README.md
Outdated
### expectsError(code[, type[, message]]) | ||
* `code` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) expected error must have this value for its `code` property | ||
* `type` [<constructor>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor) expected error must be an instance of `type` | ||
* `message` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) or [<RegExp>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) if a string is provided for `message`, expected error must have it for its `message` property; if a regular expression is provided for `message`, the regular expression must match the `message` property of the expected error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 80 characters wrap.
Add documentation for `common.expectsError()` to `test/README.md`.
Add documentation for `common.expectsError()` to `test/README.md`. PR-URL: #11382 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Landed in b5c8852 |
Add documentation for `common.expectsError()` to `test/README.md`. PR-URL: nodejs#11382 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Add documentation for `common.expectsError()` to `test/README.md`. PR-URL: #11382 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Depends on the |
Add documentation for
common.expectsError()
totest/README.md
.Checklist
Affected core subsystem(s)
test doc