Commit Graph

2 Commits

Author SHA1 Message Date
John Knox
d350e1b339 Fix for plugin failures showing up as platform failures
Summary: This got broken during TS migration. Plugin failures were being logged as platform failures, and showing up in the wrong graphs.

Reviewed By: passy

Differential Revision: D18059046

fbshipit-source-id: 8209a0e852f62e221bf64cb5091115e3cac09fd9
2019-10-22 08:45:38 -07:00
John Knox
781344f7de Fix jest mocking in tests (#592)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/592

Finally we can join the 21st century and use `jest.mock` in tests!

I'm enabling the ts-jest transform to `*/__tests__/*.tsx` files. This takes care of transforming the typescript, and preserves jest mock capabilities.
I have left the existing custom transform on all other files, so they will continue to work as usual.

Caveats:
* Our existing custom transforms will no longer be applied in tests.
  * With our current suite this makes no difference. But bear in mind things like importing directly from 'flipper' instead of the actual files, won't work. However, I don't see this being a problem, as I think they'll only be needed inside the actual product code.

Reviewed By: passy

Differential Revision: D17978753

fbshipit-source-id: df7b312b5dd5592e4aa4f8df605f5952ea3158e9
2019-10-18 07:17:40 -07:00