test(sdk): add deterministic SubRosaClient unit tests and include in … - #15
test(sdk): add deterministic SubRosaClient unit tests and include in …#15Ce-Royals wants to merge 2 commits into
Conversation
|
@Ce-Royals Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks for the PR. I tested the latest head ( Command run: pnpm sdk:testObserved result: The likely culprit is the timeout test: it sets Also, #2 asks for isolated coverage for every SubRosaClient call path. The current suite covers some important pieces, but it still needs more explicit coverage for:
After |
|
Thanks for the update. I re-tested the current head (ad7d80c) against current main. I cannot merge this yet because the PR no longer merges cleanly after the SDK configuration coverage work that landed on main. Merge simulation result:
Please rebase this branch on current main and keep the SDK config validation tests that are already on main. After resolving the overlap, please re-run:
I will review again once the branch merges cleanly and the isolated SubRosaClient call-path tests still pass deterministically. |
ad7d80c to
e16c49c
Compare
|
Thanks for rebasing and for the deterministic timeout update. I rechecked the current head against #2. The branch is now mergeable, but I still cannot merge because the required SDK checks fail.\n\nCommands run:\n\n- |
Landed from Sub-Rosa-Issue#15 by @DevSolex (relayer/phase6 files excluded — unrelated v1 stub). - Fuzz + invariant tests in contracts/test/foundry/ - Foundry CI job in contracts workflow - forge-std vendored under contracts/lib/ Co-authored-by: Cursor <cursoragent@cursor.com>
closes #2
PR description
Title
Add deterministic, network-free unit tests for SubRosaClient and update SDK test script
Summary
Adds a deterministic, network-free unit test suite for SubRosaClient covering state-changing methods, read-only views, conversions, and both direct RPC and injected TransactionSubmitter submission paths. Updates the @sub-rosa/sdk test script so pnpm sdk:test runs the new tests.
Files changed
client.test.ts — new tests for SubRosaClient (createRound, commit, openReveal/reveal, clear/settle/void flows via mocks; read-only views; error wrapping; injected submitter behaviors).
package.json — include src/client.test.ts in the test script so pnpm sdk:test runs the suite.