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 docs for AssertionError #14261

Closed
wants to merge 2 commits into from
Closed

Conversation

daxlab
Copy link
Contributor

@daxlab daxlab commented Jul 16, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Jul 16, 2017
@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Jul 16, 2017

Thank you!

Linter CI: https://ci.nodejs.org/job/node-test-linter/10517/ (is green)

@vsemozhetbyt vsemozhetbyt added the assert Issues and PRs related to the assert subsystem. label Jul 16, 2017
For example:

```js
assert.equal(1, 2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend using strictEqual() here to help set readers up for success :-)

## Class: AssertionError

A subclass of `Error` that indicates the failure of an assertion. Such errors
commonly indicate inequality of actual and expected parameters.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this could as well be "values" instead of "parameters", still LGTM.

Copy link
Contributor

@XadillaX XadillaX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

XadillaX pushed a commit that referenced this pull request Aug 10, 2017
Fixes: #12274
PR-URL: #14261
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
@XadillaX
Copy link
Contributor

XadillaX commented Aug 10, 2017

Landed in 4796fbc.

Congratulations and thanks for your first contribution!

Before: image

After: image

@XadillaX XadillaX closed this Aug 10, 2017
@daxlab daxlab deleted the issue_12274 branch August 10, 2017 14:00
addaleax pushed a commit that referenced this pull request Aug 10, 2017
Fixes: #12274
PR-URL: #14261
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
@addaleax addaleax mentioned this pull request Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants