How to resolve "Animated: `useNativeDriver` is not supported because the native animated module is missing." in react-navigation?

to disable this warning

add

jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper');

or

jest.mock('NativeAnimatedHelp');

to your test file

I'll show you how I do it

I write in package.json

"jest": {
    "setupFiles": [
      "./mock.js"
    ],

In file mock.js

jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper');
jest.mock('NativeAnimatedHelp');

You can safely ignore this warning. useNativeDriver is only important when running the code on device.