Right now we have manual $$typeof checks: https://github.com/facebook/jest/blob/af1ab24649798bcf0f7ce6ec5b3cf4ba2a53b5eb/packages/pretty-format/src/plugins/ReactElement.ts#L37-L72
It would be cool to instead use react-is
I would like to work on this.
That's awesome @Prabhakar-17! Go for it 馃檪
Running yarn install is giving me this error: weak compilation error. Any idea how to resolve this?
I'd just remove the dependency in jest-leak-detector and ignore the test warnings surrounding it. I've tried to get it to work on a windows image without luck 馃檪
@SimenB How can I test my changes to make sure something else is not broken because of the change. yarn test result looks good, anything specific that needs to be done in this case?
If our tests pass, then you're good - we have quite good test coverage on pretty-format. Looking forward to the PR!
There's problem with the @types/react-is package. I have raised an issue here
@types/react is at 16.8.6 in this repo (latest) (updated a few days ago)
https://github.com/facebook/jest/blob/5ba35be3ef64090bae5e04f51fd170529fba3d1a/yarn.lock#L1772-L1778
So that should be fixed?
Hi @SimenB, I took a crack at this. Let me know if you think my changes make sense. https://github.com/facebook/jest/pull/8058
Thanks!
@SimenB Yes, it worked. Will submit the PR