★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/27123Nouvelle recherche | Portail wanayoo
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: simplify tests by using assert.rejects #27123

Closed
wants to merge 2 commits into from

Conversation

BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Apr 7, 2019

Please check the commit descriptions for details.

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

BridgeAR added 2 commits Apr 7, 2019
Use `assert.rejects` to test error cases. This simplifies the test.
This verifies that the test actually rejects at this point by using
`assert.rejects` instead of `try / catch`.
@BridgeAR BridgeAR requested a review from devsnek Apr 7, 2019
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 7, 2019

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Apr 7, 2019

lpinca
lpinca approved these changes Apr 7, 2019
hiroppy
hiroppy approved these changes Apr 7, 2019
jasnell
jasnell approved these changes Apr 8, 2019
BridgeAR added a commit to BridgeAR/node that referenced this issue Apr 10, 2019
Use `assert.rejects` to test error cases. This simplifies the test.

PR-URL: nodejs#27123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this issue Apr 10, 2019
This verifies that the test actually rejects at this point by using
`assert.rejects` instead of `try / catch`.

PR-URL: nodejs#27123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR
Copy link
Member Author

@BridgeAR BridgeAR commented Apr 10, 2019

Landed in 3d6533e and 3a6eba3 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants