Skip to content

test: add contract integration tests for frontend-to-contract data flow (#93)#194

Merged
Mosas2000 merged 1 commit intomainfrom
test/contract-integration
Feb 26, 2026
Merged

test: add contract integration tests for frontend-to-contract data flow (#93)#194
Mosas2000 merged 1 commit intomainfrom
test/contract-integration

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Changes

24 new integration tests verifying the frontend correctly constructs Clarity values and parses contract responses:

Test Suites

  • Argument Construction (5 tests): principalCV, uintCV, stringUtf8CV, category uintCV, full arg validation
  • STX Amount Conversion (9 tests): min/max amounts, float precision edge cases, round-trip conversion, zero handling
  • Contract Response Parsing (5 tests): ok/err uint responses, tuple user stats, optional none/some tip data
  • Post-condition Matching (3 tests): amount parity, fee calculation, minimum fee enforcement
  • cvToString Output (2 tests): principal and uint string representation

53 frontend tests passing (29 existing + 24 new)

Closes #93

… flow

- Test Clarity value construction for all send-categorized-tip args
- Test STX amount conversion edge cases (floats, precision, min, max)
- Test cvToJSON response parsing for ok/err/tuple/optional types
- Test post-condition amount matching and fee calculation parity
- Test cvToString output for event repr parsing compatibility
@Mosas2000 Mosas2000 merged commit 3064370 into main Feb 26, 2026
1 of 3 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

Development

Successfully merging this pull request may close these issues.

Add contract integration tests that verify frontend-to-contract data flow

1 participant