Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information