-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
The utils.ts file contains several utility functions that would benefit from unit tests to ensure their correctness and prevent regressions.
Tasks:
- Set up a testing framework (e.g., Jest) if not already in place.
- Write unit tests for the following functions:
- toUintArray
- toUint8Array
- padU8ToU32Array
- padArray
- uint8ArrayToBits
- bitsToUint8Array
- uintArrayToBits
- bitsToUintArray
- getFullCounterIv
- getCounterForChunk
- Ensure each test covers normal use cases and edge cases.
- Add comments explaining the purpose of each test.
- Update the project's README with instructions on how to run the tests.
Adding unit tests will improve the reliability of these utility functions and make it easier to maintain and refactor the code in the future.
Contributors: Please note that by submitting a pull request, you are agreeing to accept and sign the Contributor License Agreement (CLA) found at https://github.com/reclaimprotocol/.github/blob/main/CLA.md