This directory contains tests that verify Zorsh's compatibility with Rust's Borsh implementation. These tests ensure that Zorsh correctly serializes and deserializes data in a format that is compatible with Rust's Borsh library.
To run the Rust compatibility tests:
- Make sure you have Rust and Cargo installed on your system
- Navigate to the
rust/borsh_test
directory - Generate test data:
cargo test -- --ignored
- Return to the project root and run the TypeScript tests:
npm test
The tests in complex-serialization.test.ts
verify that complex data structures are correctly serialized and deserialized between TypeScript and Rust implementations.