score:2

You will need to make a mock for this library.

E.g.

  1. Create a directory __mocks__ in app
  2. Create a file react-native-view-shot.js
  3. In the file, add the following:

    jest.mock('react-native-view-shot', () => {
      return {
        // whatever function you want to mock, e.g capture: jest.fn()
      };
    });
    

Related Query

More Query from same tag