How to integration test calls to the ExpoSDK APIs

Viewed 11

My app makes calls to Expo SQLite for data persistence. I have good unit test coverage for my business logic.

I want tests to make sure my calls to the Expo SQLite API as well as my SQL queries are functioning correctly in edge cases.

I've considered:

  • Snapshot testing seems to be very coupled to logic inside React components. And don't have access to ExpoSDK APIs.
  • E2E testing with Appium and Selenium seem more focused on how the UI looks.
  • I could make mocks for ExpoSDK modules, but this involves a lot of effort and potential maintenance that is sort of tangential to testing. Also this approach causes coupling the the implementation of my classes instead of to the result/business rules.

I'm imagining a testing framework that will run my tests on a mobile simulator, and make a React Native View that displays the test results. Similar to what Mocha does in the browser. Is anyone aware of such a testing framework for React Native?

0 Answers
Related