Jest mocks not found on version 1.10.0


Jest does not find react-native-gesture-handler mocks on the last version (1.10.0). Probably related to #1199



Steps To Reproduce

  1. Update react-native-gesture-handler to version 1.10.0
  2. Run yarn test

Expected behavior

Run test cases normally as it always does.

Actual behavior

Fails with error: Module <rootDir>/node_modules/react-native-gesture-handler/jestSetup.js in the setupFiles option was not found.

Package versions

  • React: 16.13.1
  • React Native: 0.63.4
  • React Native Gesture Handler: 1.10.0

4 thoughts on “Jest mocks not found on version 1.10.0

  1. @jakub-gonet Still not able to use the mock even on latest version 1.10.1 — I see the following error

    TypeError: Cannot read property 'Direction' of undefined
          at Object.<anonymous> (node_modules/react-native-gesture-handler/dist/src/Directions.js:2:33)
          at Object.<anonymous> (node_modules/react-native-gesture-handler/dist/index.js:1:3993)
  2. Also seeing “Cannot read property ‘Direction’ of undefined” in 1.10.1. 1.9.0 works fine – reverted for the time being.