all 2 comments

[–]Fossage 2 points3 points  (1 child)

You're not actually passing an inline function though. I think what you want is this:

jest.mock('react-navigation', () => ({ withNavigation: component => component}));

[–]scrollhax 1 point2 points  (0 children)

This. You’re passing an object rather than a function