Skip to content

Commit

Permalink
Merge pull request #132 from Vovke/contributing-update
Browse files Browse the repository at this point in the history
docs: how to run tests locally
  • Loading branch information
Slesarew authored Nov 13, 2024
2 parents 07178a6 + f302dcd commit 29e8eb2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
## Preparing development environment

It's possible to mimic to spawn chopsticks instances in parallel for development purposes.
Chopsticks Dockerfile exposes 4 ports (8000, 8500, 9000, 9500), so you can spawn 4 instances of chopsticks and each one of them will look at different RPC.
Chopsticks Dockerfile exposes 4 ports (8000, 8500, 9000, 9500), so you can spawn up to 4 instances of chopsticks and each one of them will look at different RPC (note that those will be different chains).
Note that the RPCs are not real, so the changes made on one chopsticks instance will not affect the others.

1. `cd chopsticks`
2. `docker compose up`, in case you want to just 2 instances edit the docker-compose.yml file
3. start the app with `KALATORI_CONFIG` environment variable pointing to `configs/chopsticks.toml`

## Running tests locally

While having the kalatori app running. You can run the tests locally by running the following command:

```bash
cd tests/kalatori-api-test-suite
yarn
yarn test
```

You can run specific test similarly to the following command:

```bash
cd tests/kalatori-api-test-suite
yarn test -t "should create, repay, and automatically withdraw an order in USDC"
```

## Version Bumping and Release Process

When you make changes that require a new version of the project, follow these steps to bump the version:
Expand Down

0 comments on commit 29e8eb2

Please sign in to comment.