Skip to content

Set up Vitest component tests for frontend #247

@ogazboiz

Description

@ogazboiz

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Description

The frontend has no automated tests. The CI pipeline builds the app but never runs tests. Vitest is already available in the ecosystem — adding component tests would catch regressions early.

Test Cases Needed

  • StreamCreationForm — validation errors shown for invalid inputs
  • StreamCard — renders correct sender/recipient/amount/rate
  • useStreamEvents hook — connects to SSE, updates on events, reconnects on disconnect
  • amount.ts utilities — conversion and formatting functions
  • Wallet context — connect/disconnect state transitions

Files

  • frontend/src/__tests__/ (create)
  • frontend/vitest.config.ts

Acceptance Criteria

  • Tests run with npm test in frontend
  • CI frontend job runs tests
  • At least 60% coverage on utility functions

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programfrontendFrontend related taskstestingTesting related tasks

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions