Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: initial test restructuring and rust command addition #236

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test-anchor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
- name: Check solana config
run: solana config get

- name: Cloning snarkjs and groth16-solana
run: git submodule update --init --recursive

- run: npm run anchor build
shell: bash

Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,27 @@ The `web` directory contains a React app that interacts with the Solana program
- Start the web app: `npm run dev`
- Build the web app: `npm run build`

### Tests

Currently, only the blockchain (Anchor) part has tests, which are both Rust and TypeScript. Rust focuses more on Solana's inner workings, while TypeScript focuses on external interactions (though there is some overlap).

Typescript tests are stored in: `anchor/tests/jest/*`

Rust tests are stored in: `anchor/tests/src/*`


To run typescript tests:

`npm run anchor-jest-test`

To run rust tests:

`npm run anchor-rust-test`

To run both:

`npm run anchor-test`

### Setup/Deployment

#### Localnet
Expand Down
Loading