End to end tests of the Fermi DEX programs can be performed using anchor CLI
Core Orderbook Functionality
To test out the full functionality of Fermi DEX, you can simply follow the following steps. Below, we deep dive into each test and the steps it demonstrates.
First, in a separate terminal, run the solana local validator:
solana local validator
Next, in another terminal, enable logs. This is not mandatory but would better allow you to see the execution steps of different tests in real time.
solana logs
Finally, clone the repo and run the tests!
git clone https://github.com/cryptohariseldon/Fermi-orderbook/
yarn
anchor build
anchor test --skip-local validator
This executes 5 tests, providing broad coverage of all the essential functionalities in the lifecycle of a trade. In particular, you can see that the trade creation, and trade finalisation proceeds successfully by monitoring logs on the local validator, and/or checking values of the OpenOrdersPDA for each user involved, before and after finalisation.