Skip to content

test: add referral code and tx-builder tests#377

Merged
IbrahimIjai merged 3 commits into
SO4-Markets:mainfrom
drips-projects:Contract-SDK-referral-code-round-trip-tests
Jul 24, 2026
Merged

test: add referral code and tx-builder tests#377
IbrahimIjai merged 3 commits into
SO4-Markets:mainfrom
drips-projects:Contract-SDK-referral-code-round-trip-tests

Conversation

@Joeloo1

@Joeloo1 Joeloo1 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Referral code round-trip tests: 7 fixture cases (lowercase, uppercase, numeric, mixed, boundary) verifying string preservation through referralCodeToScValscValToReferralCode.
  • Referral code validation tests: 17 edge cases covering empty, whitespace, long strings, symbols, unicode, unsupported types, and a type-level return type assertion.
  • TX builder sendAndPoll tests: 8 tests using MSW JSON-RPC handlers (no SDK client module mocks) covering successful submission, DUPLICATE/ERROR/TRY_AGAIN_LATER send statuses, timeout, FAILED poll status, and multi-poll success.

All tests pass with bun run --cwd packages/contracts test and vitest in apps/web.

Closes #196
Closes #197
Closes #245
Closes #246

- Referral code round-trip tests (7 fixtures + boundary cases)
- Referral code validation tests (17 edge cases + type-level test)
- TX builder sendAndPoll tests (MSW handlers, no SDK mocks)
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Joeloo1 is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Joeloo1 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! 🚀

Learn more about application limits

Joeloo1 added 2 commits July 24, 2026 22:58
- Fix sort-imports: HttpResponse before http, TxFailedError before sendAndPoll
- Fix spaced-comment: add space after //
- Fix no-unnecessary-condition: use Partial<Record> for routes, object state for drive
Use error classes in instanceof assertions instead of string comparisons
to satisfy noUnusedLocals typecheck rule.
@IbrahimIjai
IbrahimIjai merged commit 95ef41f into SO4-Markets:main Jul 24, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants