๐งชTesting Locally
End to end tests of the Fermi DEX programs can be performed using anchor CLI
Last updated
End to end tests of the Fermi DEX programs can be performed using anchor CLI
Last updated
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!
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.
To run your own version of the Fermi DEX UI, follow the following steps: First, clone the repo: https://github.com/adarshzpatel/fermi-frontend
First, run the development server:
npm run dev or yarn run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.