Skip to content

Latest commit

 

History

History
82 lines (51 loc) · 1.91 KB

DEVELOPMENT.md

File metadata and controls

82 lines (51 loc) · 1.91 KB

Development

This document describes how to setup your environment to build Bitkit for development and to run automated tests. If you just want to build it from source for normal usage, see BUILD.md.

Requirements

Make sure you have setup your environment for React Native.

Installation

  1. Clone the repository
git clone [email protected]:synonymdev/bitkit.git && cd bitkit
  1. Switch Node version

Switch to the Node.js version defined in .node-version. You can visit .node-version File Usage and use one of these methods to change the node version you need.

  1. Install dependencies
yarn install
  1. Start the project

On iOS Simulator/Device:

yarn ios

On Android Emulator/Device:

yarn android

Testing

Bitkit uses two types of testing: unit and end-to-end (E2E) tests.

Before running tests, you need to install Docker and run bitcoind and the electrum server in regtest mode. You can do this by using the docker-compose.yml file from the docker directory:

cd docker
docker compose up

After that, you are ready to run the tests:

1. Unit tests

yarn test

2. End-to-end (E2E) tests

End-to-end tests are powered by Detox. Currently, only the iOS Simulator is supported.

To build the tests:

yarn e2e:build:ios-release

To run them:

yarn e2e:test:ios-release

Troubleshooting

When running into issues there are a couple things to check.

  • Clean caches & build folders: yarn clean
  • Clean simulator cache (iOS): xcrun simctl erase all
  • Increase emulated device storage (Android): Android Studio -> Virtual Device Manager -> Edit Device -> Show Advanced Settings -> increase RAM, VM heap and Internal Storage sizes