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

assert,test: complete coverage for AssertionError #27635

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 10, 2019

There were two code branches in lib/internal/assert/assertion_error.js
that were not covered by tests. This adds a test to cover the
two uncovered branches. The test revealed that there was some missing
properties/functaionality in the AssertionError class. So this also adds
the missing material.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

There were two code branches in lib/internal/assert/assertion_error.js
that were not covered by tests. This adds a test to cover the
two uncovered branches. The test revealed that there was some missing
properties/functaionality in the AssertionError class. So this also adds
the missing material.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label May 10, 2019
@Trott Trott requested a review from BridgeAR May 10, 2019 03:23
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

I removed those because they are not used by assert. The operator is == and != for these two cases. We do expose AssertionError but this is not documented and I believe we should consider that an implementation detail.

Instead, it would be better to fix the conditions to match the correct operator.

@BridgeAR BridgeAR mentioned this pull request May 13, 2019
4 tasks
@Trott
Copy link
Member Author

Trott commented May 13, 2019

Closing in favor of #27676

@Trott Trott closed this May 13, 2019
@Trott Trott deleted the test-assert branch January 13, 2022 22:51
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants