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

Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev #17605

Merged
merged 3 commits into from
Dec 16, 2019

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Dec 14, 2019

Continues #17599.
Part of #16753.

This renames the matchers to match the console method names, now that we use console directly:

  • toWarnDev -> toErrorDev (because it captures console.error calls)
  • toLowPriorityWarnDev -> toWarnDev (because it captures console.warn calls)

I initially considered more explicit names like toConsoleErrorDev but it's annoying when it's used so much. Arguably there could be some confusion between toThrow and toErrorDev, but the *Dev suffix in my opinion is sufficient to remember which one does what.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 14, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a0b8017:

Sandbox Source
zealous-wescoff-ht8dq Configuration

@sizebot
Copy link

sizebot commented Dec 14, 2019

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against a0b8017

@sizebot
Copy link

sizebot commented Dec 14, 2019

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against a0b8017

@gaearon gaearon merged commit 0b5a26a into facebook:master Dec 16, 2019
@gaearon gaearon deleted the rename-matchers branch December 16, 2019 12:48
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
…7605)

* Rename toWarnDev -> toErrorDev in tests

* Rename toWarnDev matcher implementation to toErrorDev

* Rename toLowPriorityWarnDev -> toWarnDev in tests and implementation
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.

None yet

4 participants