Skip to content

Latest commit

 

History

History

README.md

PowerSync Tests

This is a React Native test application for PowerSync, currently only used to test the OP-sqlite based DB adapter.

Getting Started

  1. Install dependencies and build packages in the root directory:
pnpm install
pnpm build:packages
  1. Start Metro bundler:
pnpm start
  1. Run the app:

For iOS

A couple of pro-tips:

  1. Be sure to install your XCode updates, since it can generate very cryptic errors if you don't.
  2. Be sure to use the right ruby version. You can use rbenv or rvm to switch versions. Check the Gemfile for which version to use.

Update pods:

cd ios
bundle exec pod update
cd ..

Then run:

pnpm ios

For Android

pnpm android
  1. Run tests

iOS

pnpm detox build --configuration ios.sim.debug
pnpm detox test --configuration ios.sim.debug

Android

pnpm detox build --configuration android.emu.debug
# replace Pixel_3a_API_34 with your desired AVD name, defaults to "ubuntu-avd-x86_64-31" for AVD via GitHub CI KVM
DETOX_AVD_NAME=Pixel_3a_API_34 pnpm detox test --configuration android.emu.debug 
```