Как издеваться над @ response-native-community / geolocation с помощью детоксикации? - PullRequest
1 голос
/ 25 октября 2019

Опишите ошибку

Сбой теста Детокс при использовании с модулем геолокации

Ошибка

Error: @react-native-community/geolocation: NativeModule.RNCGeolocation is null. To fix this issue try these steps:
• Run `react-native link @react-native-community/geolocation` in the project root.
• Rebuild and re-run the app.
• If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-geolocation

<global>
    nativeInterface.js:17:8
loadModuleImplementation
    require.js:322:6
<global>
    implementation.native.js:11
loadModuleImplementation
    require.js:322:6
<global>
    index.js:11
loadModuleImplementation
    require.js:322:6
<global>
    TravelTimeContainer.js:3
loadModuleImplementation
    require.js:322:6
<global>
    index.js:1
loadModuleImplementation
    require.js:322:6
<global>
    MyDay.js:5
loadModuleImplementation
    require.js:322:6
<global>
    BottomTabNavigator.js:14
loadModuleImplementation
    require.js:322:6
<global>
    AppNavigator.js:16
loadModuleImplementation
    require.js:322:6
<global>
    Setup.js:8
loadModuleImplementation
    require.js:322:6
<global>
    App.js:2
loadModuleImplementation
    require.js:322:6
<global>
    index.js:6
loadModuleImplementation
    require.js:322:6
guardedLoadModule
    require.js:201:45
global code
    index.bundle?platform=ios&dev=true&minify=false:195242:4

Окружающая среда (пожалуйста, заполните следующую информацию):

  • «реакция-натив»: «0.61.1»,
  • «реакция»: «^ 16.9.0»,
  • "@ react-native-community / geolocation": "^ 2.0.2",
  • "detox": "^ 14.4.1",

Примечание

  • Я запускаю тесты на симуляторе iOS.
  • Библиотека геолокации связана правильно и прекрасно работает во время выполнения.

Пожалуйста, предоставьте решение для того же.

...