Skip to content

Conversation

@BridgeAR
Copy link
Member

@BridgeARBridgeAR commented Dec 9, 2017

assert.throws and assert.doesNotThrow set the operator to a
internal function. That was actually not intended as the operator
is not defined at all in those cases.

CI https://ci.nodejs.org/job/node-test-pull-request/12003/

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

assert

@nodejs-github-botnodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label Dec 9, 2017
Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is OK

@BridgeAR
Copy link
MemberAuthor

While thinking about it again and before I merge it - one alternative would be to use throws or doesNotThrow as operator here. Even though it strictly does not have the same meaning as the other operators and it would be semver-minor in that case as the property did not exist before.
@Trott@cjihrig what do you think?

@Trott
Copy link
Member

@Trott@cjihrig what do you think?

Offhand, I have no strong opinion. @cjihrig ?

@cjihrig
Copy link
Contributor

No strong opinion.

assert.throws and assert.doesNotThrow set the operator to a internal function. That was by accident and originally the operator was undefined. This changes it to show "throws" or "doesNotThrow".
@BridgeAR
Copy link
MemberAuthor

I decided to add the operator. In case a error is caught it is immediately clear what function triggered the error by looking the operator in that case.

@BridgeAR
Copy link
MemberAuthor

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 15, 2017
@BridgeAR
Copy link
MemberAuthor

Landed in a6788b4

BridgeAR added a commit to BridgeAR/node that referenced this pull request Dec 15, 2017
assert.throws and assert.doesNotThrow set the operator to a internal function. That was by accident and originally the operator was undefined. This changes it to show "throws" or "doesNotThrow". PR-URL: nodejs#17575 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
@addaleaxaddaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 29, 2017
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
assert.throws and assert.doesNotThrow set the operator to a internal function. That was by accident and originally the operator was undefined. This changes it to show "throws" or "doesNotThrow". PR-URL: #17575 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 10, 2018
@MylesBorins
Copy link
Contributor

should this be backported? My gut is saying no, but I'm not 100%

@MylesBorins

This comment has been minimized.

@MylesBorins
Copy link
Contributor

ping re: backport

@MylesBorins
Copy link
Contributor

ping @BridgeAR

BridgeAR added a commit to BridgeAR/node that referenced this pull request Oct 2, 2018
assert.throws and assert.doesNotThrow set the operator to a internal function. That was by accident and originally the operator was undefined. This changes it to show "throws" or "doesNotThrow". PR-URL: nodejs#17575 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 31, 2018
assert.throws and assert.doesNotThrow set the operator to a internal function. That was by accident and originally the operator was undefined. This changes it to show "throws" or "doesNotThrow". Backport-PR-URL: #23223 PR-URL: #17575 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
@BethGriggsBethGriggs mentioned this pull request Nov 12, 2018
@BridgeARBridgeAR deleted the fix-assert-operator branch April 1, 2019 23:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@BridgeAR@Trott@cjihrig@MylesBorins@apapirovski@jasnell@addaleax@nodejs-github-bot