FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add optional throw fn to expectsError by BridgeAR · Pull Request #14089 · nodejs/node · GitHub

/ node Public

test: add optional throw fn to expectsError - #14089

Merged
refack merged 1 commit into
nodejs:masterfrom
BridgeAR:expects-error-expects-throw
Jul 8, 2017
Merged

test: add optional throw fn to expectsError#14089
refack merged 1 commit into
nodejs:masterfrom
BridgeAR:expects-error-expects-throw

Conversation

BridgeAR commented Jul 5, 2017

Copy link
Copy Markdown
Member

This is mainly a style thing but I think it's pretty nice to add the throwing function directly to common.expectsError instead of wrapping that into the throw function as it's done most of the time.

I thought I just create this as a example and I only changed a few tests accordingly.

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)

test

nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 5, 2017

Copy link
Copy Markdown
Member

Change LGTM, I don't think I've ever used an expectsError without throws before (except in callbacks).

Trott commented Jul 5, 2017

Copy link
Copy Markdown
Member

@nodejs/testing

tniessen self-assigned this Jul 6, 2017

tniessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code LGTM.

refack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Docs ttps://github.com/nodejs/node/blob/master/test/common/README.md

refack commented Jul 6, 2017

Copy link
Copy Markdown
Contributor

@BridgeAR You're the one who's gonna have to resolve all the conflicts in expectsError 😉

BridgeAR commented Jul 8, 2017

Copy link
Copy Markdown
Member Author

@refack I added the documentation.

About resolving the conflicts: I think it would be best to first merge this as is and then change all those calls over time.

refack commented Jul 8, 2017

Copy link
Copy Markdown
Contributor

refack assigned refack and unassigned tniessen Jul 8, 2017
PR-URL: nodejs#14089
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
refack force-pushed the expects-error-expects-throw branch from 67f5900 to d6fece1 Compare July 8, 2017 20:02
refack merged commit d6fece1 into nodejs:master Jul 8, 2017

Copy link
Copy Markdown
Member

This doesn’t land cleanly on 8.x; if you can, please follow the guide and raise a backport PR, if you don’t think it’s worth it let me know and we’ll add the dont-land-on label.

refack commented Jul 22, 2017

Copy link
Copy Markdown
Contributor

@BridgeAR IMHO if you apply the PRs to test/common in order they should land cleanly, I believe you could group them all into a single backport PR.
Alternatively (if you haven't tried it already) @addaleax could you try cherry picking them in chronological order. We did several "conflicting" changes in the last couple of weeks, so I'm assuming they will only land cleanly if picked in the same order they landed.

Copy link
Copy Markdown
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

Copy link
Copy Markdown
Member Author

This function does not exist in v.6 so backporting is obsolete.

refack removed their assignment Oct 12, 2018
BridgeAR deleted the expects-error-expects-throw branch April 1, 2019 23:36
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

Labels

test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL