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

test: stricten readline keypress failure test condition #31300

Closed

Conversation

BridgeAR
Copy link
Member

This verifies that the thrown error is the expected one. That was
not tested before.

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

This verifies that the thrown error is the expected one. That was
not tested before.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 10, 2020
@nodejs-github-bot
Copy link
Collaborator

@ZYSzys ZYSzys added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 11, 2020
@nodejs-github-bot
Copy link
Collaborator

} catch { }
assert.throws(
() => fi.emit('data', 'fooX'),
(e) => {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of a validation function, can't this just be err?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would also work but I wanted to have a reference equality check. That would not be checked if I'd use err directly.

BridgeAR added a commit that referenced this pull request Jan 12, 2020
This verifies that the thrown error is the expected one. That was
not tested before.

PR-URL: #31300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@BridgeAR
Copy link
Member Author

Landed in 7952467 🎉

@BridgeAR BridgeAR closed this Jan 12, 2020
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
This verifies that the thrown error is the expected one. That was
not tested before.

PR-URL: #31300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@codebytere codebytere mentioned this pull request Jan 16, 2020
@BridgeAR BridgeAR deleted the 2020-01-10-add-stricter-readline-test branch January 20, 2020 12:10
codebytere pushed a commit that referenced this pull request Mar 14, 2020
This verifies that the thrown error is the expected one. That was
not tested before.

PR-URL: #31300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
This verifies that the thrown error is the expected one. That was
not tested before.

PR-URL: #31300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@codebytere codebytere mentioned this pull request Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants