assert: fix .throws and .doesNotThrow stack frames#17703
Closed
BridgeAR wants to merge 2 commits intonodejs:masterfrom
Closed
assert: fix .throws and .doesNotThrow stack frames#17703BridgeAR wants to merge 2 commits intonodejs:masterfrom
BridgeAR wants to merge 2 commits intonodejs:masterfrom
Conversation
The stack frames from .throws and .doesNotThrow got included even though that was not intended.
A combination of try catch and common.expectsError is not necessary as the latter already does everything on its own.
TimothyGu
approved these changes
Dec 16, 2017
Member
TimothyGu
left a comment
There was a problem hiding this comment.
This might need to be semver-major.
Member
Author
|
@TimothyGu theoretically someone could rely on that behavior but stack frames change relatively often without it being semver-major. It could be argued that this is specifically semver-major because it is the |
jasnell
approved these changes
Dec 18, 2017
Member
Author
Member
Author
BridgeAR
added a commit
to BridgeAR/node
that referenced
this pull request
Dec 19, 2017
The stack frames from .throws and .doesNotThrow got included even though that was not intended. PR-URL: nodejs#17703 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR
added a commit
to BridgeAR/node
that referenced
this pull request
Dec 19, 2017
A combination of try catch and common.expectsError is not necessary as the latter already does everything on its own. PR-URL: nodejs#17703 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Contributor
|
This does not land cleanly on v9.x Would someone be willing to backport? |
BridgeAR
added a commit
to BridgeAR/node
that referenced
this pull request
Mar 8, 2018
The stack frames from .throws and .doesNotThrow got included even though that was not intended. PR-URL: nodejs#17703 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR
added a commit
to BridgeAR/node
that referenced
this pull request
Mar 8, 2018
A combination of try catch and common.expectsError is not necessary as the latter already does everything on its own. PR-URL: nodejs#17703 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
4 tasks
Member
Author
|
Backport opened in #19230 |
Merged
Contributor
|
Requested backport to 8.x in #19230 |
BridgeAR
added a commit
to BridgeAR/node
that referenced
this pull request
Oct 2, 2018
The stack frames from .throws and .doesNotThrow got included even though that was not intended. PR-URL: nodejs#17703 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All assert functions suppress their own function name from showing up in the stack trace.
That was not the case with
throwsanddoesNotThrow.On top of that I refactored two
common.expectsErrorcases that were less than ideal. I can open a new PR for that if that is requested, but I stumbled upon those when looking for a good place to add a new test, so I thought it would be fine to include it in this PR.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
assert, test