Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Feb 14, 2017

Add documentation for common.expectsError() to test/README.md.

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test doc

@Trott Trott added doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. labels Feb 14, 2017
@Trott Trott requested a review from jasnell February 14, 2017 19:02
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 14, 2017
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]])
Copy link
Member

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?

Copy link
Member Author

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`
Copy link
Member

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)

Copy link
Member Author

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
Copy link
Member

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`.
jasnell pushed a commit that referenced this pull request Feb 16, 2017
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]>
@jasnell
Copy link
Member

jasnell commented Feb 16, 2017

Landed in b5c8852

@jasnell jasnell closed this Feb 16, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 20, 2017
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]>
italoacasas pushed a commit that referenced this pull request Feb 22, 2017
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]>
@italoacasas italoacasas mentioned this pull request Feb 25, 2017
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

Depends on the common.expectsError() to be backported to v4 or v6 which has not yet happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants