https://github.com/nimiq/nimiq-utils
Simple helper libraries for Nimiq frontends
https://github.com/nimiq/nimiq-utils
Last synced: about 2 months ago
JSON representation
Simple helper libraries for Nimiq frontends
- Host: GitHub
- URL: https://github.com/nimiq/nimiq-utils
- Owner: nimiq
- License: apache-2.0
- Created: 2018-01-29T05:36:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-02-05T08:10:49.000Z (11 months ago)
- Last Synced: 2025-02-05T08:33:34.985Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 934 KB
- Stars: 6
- Watchers: 10
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- nimiq-awesome - Nimiq Utils - utils)) ([@nimiq](https://github.com/nimiq)): Collection of JS utilities for Nimiq (Developer Resources / Utils)
README
# Nimiq Utils
Simple helper libraries for nimiq frontends.
Read the [documentation](https://www.nimiq.com/developers/build/nimiq-utils) for more information.
## Development
Run `yarn` to install the dependencies.
### Running tests
Run `yarn test` to run all tests.
#### RPC snapshot testing
The test suite includes snapshot based RPC testing for `AlbatrossPolicy` and `SupplyCalculator`. This system captures RPC responses as snapshots, allowing faster test runs and offline testing.
- Snapshots are stored in the `tests/__snapshots__/` directory.
- Tests use these snapshots by default instead of making actual RPC calls.
- To update snapshots with fresh RPC responses, run `yarn test:update`.
This ensures that our client-side calculations always match the actual RPC implementation, without requiring a live connection for each test run.