michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.29k stars 226 forks source link

_geolocation.default.setRNConfiguration is not a function #160

Open Bilal112 opened 3 years ago

Bilal112 commented 3 years ago

Ask your Question

GeoLocation. setRNConfigration is not working jest image

FSL-Cristopher commented 1 year ago

U can try to mock it:

jest.mock('@react-native-community/geolocation', () => ({
  addListener: jest.fn(),
  getCurrentPosition: jest.fn(),
  removeListeners: jest.fn(),
  requestAuthorization: jest.fn(),
  setConfiguration: jest.fn(),
  startObserving: jest.fn(),
  setRNConfiguration: jest.fn(),
  stopObserving: jest.fn(),
}));