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

Improved toWarnDev matcher to avoid swallowing errors #12081

Merged

Commits on Jan 23, 2018

  1. Improved toWarnDev matcher to avoid swallowing errors

    While writing tests for unsafe async warnings, I noticed that in certain cases, errors were swallowed by the toWarnDev matcher and resulted in confusing test failures. For example, if an error prevented the code being tested from logging an expected warning- the test would fail saying that the warning hadn't been logged rather than reporting the unexpected error. I think a better approach for this is to always treat caught errors as the highest-priority reason for failing a test.
    
    I reran all of the test cases for this matcher that I originally ran with PR facebook#11786 and ensured they all still pass.
    bvaughn committed Jan 23, 2018
    Configuration menu
    Copy the full SHA
    29b31bc View commit details
    Browse the repository at this point in the history