fbjs icon indicating copy to clipboard operation
fbjs copied to clipboard

Fail tests when not spying on warning()

Open zpao opened this issue 8 years ago • 0 comments

In React we fail tests when there are unexpected calls to warning(). This makes sure than any warnings are intentional. If a test does something that results in a warning, we spyOn console.error. We aren't doing that here but we probably should (will need to figure out if we can take some of the logic we have internally or if we have to recreate it, the React way might be hackier than the internal way).

zpao avatar Jul 23 '15 17:07 zpao