I'm having an error while running yarn test on react native mobile application.
Test suite failed to run
Invariant Violation: __fbBatchedBridgeConfig is not set, cannot invoke native modules
2 | // import console = require('console');
3 |
> 4 | if (!NativeModules.DeviceMotionModule) {
| ^
5 | throw new Error('Native modules for sensors not available. Did react-native link run successfully?')
6 | }
7 |
at invariant (node_modules/invariant/invariant.js:40:15)
at Object.invariant (node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:162:3)
at Object.require [as NativeModules] (node_modules/react-native/Libraries/react-native/react-native-implementation.js:322:12)
at Object.NativeModules (src/NativeModules/SensorsIOS/sensors.js:4:6)
I'm new to testing with jest.
I have a set of costum native modules for IOS and Android in my project (not an npm module).