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

Update additional tests to use .toWarnDev() matcher #11952

Merged
merged 4 commits into from
Jan 3, 2018

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jan 2, 2018

Follow-up for PR #11786

Update additional unit tests to use .toWarnDev() instead of console spies and if-DEV conditionals.

Note this test previous had some hacky logic to verify errors were reported against unique line numbers. Since the new matcher doesn't suppor this, I replaced this check with an equivalent (I think) comparison of unique DOM elements (eg div -> span)
@bvaughn bvaughn changed the title [WIP] Update additional tests to use .toWarnDev() matcher Update additional tests to use .toWarnDev() matcher Jan 3, 2018
@bvaughn bvaughn requested a review from gaearon January 3, 2018 17:41
@bvaughn
Copy link
Contributor Author

bvaughn commented Jan 3, 2018

This is probably ready to review and merge at any point. I'm still working on the remaining tests, but I can push to a new branch if this one gets merged before I'm done.

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

I haven't read every line but from skimming it looks good

@gaearon
Copy link
Collaborator

gaearon commented Jan 3, 2018

(Also, the rate of deleted lines is nice :-)

@bvaughn
Copy link
Contributor Author

bvaughn commented Jan 3, 2018

(Also, the rate of deleted lines is nice :-)

Oh yeah 🎉

@bvaughn bvaughn merged commit a442d9b into facebook:master Jan 3, 2018
@bvaughn bvaughn deleted the toWarnDev-part-2 branch January 3, 2018 18:08
yenshih pushed a commit to yenshih/react that referenced this pull request Jan 6, 2018
* Migrated several additional tests to use new .toWarnDev() matcher

* Migrated ReactDOMComponent-test to use .toWarnDev() matcher

Note this test previous had some hacky logic to verify errors were reported against unique line numbers. Since the new matcher doesn't suppor this, I replaced this check with an equivalent (I think) comparison of unique DOM elements (eg div -> span)

* Updated several additional tests to use the new .toWarnDev() matcher

* Updated many more tests to use .toWarnDev()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants