Test
Requirements
- light cli version 0.27.1-alpha.2+ (install via
npm install -g @lightprotocol/zk-compression-cli@0.27.1-alpha.2) - solana cli version 2.1.16+
- anchor version 0.31.1+
- Node.js and npm
Running Tests
Rust Tests
TypeScript Tests
-
Build the program and sync the program ID:
-
Start the test validator with the program deployed:
NOTE: Replace
<PROGRAM_ID>with the ID fromAnchor.tomland<program_name>withcreate,update,close,reinit, orburn. -
Install dependencies and run tests:
@lightprotocol/stateless.js.
light test-validator spawns the following background processes:
- solana test validator
http://127.0.0.1:8899 - prover server
http://127.0.0.1:3001 - photon indexer
http://127.0.0.1:8784
lsof -i:<port> and kill <pid>.