Skip to content

Add unit tests for contractErrors.ts parsing #751

@Ejirowebfi

Description

@Ejirowebfi

Description

contractErrors.ts parses Soroban error codes into human-readable messages, but has no unit tests. A regression here would show raw error codes to users.

Tasks

  • Create frontend/src/test/contractErrors.test.ts
  • Test each known error code (1–7) maps to the correct message
  • Test unknown error codes return a generic fallback message
  • Test malformed error strings do not throw

Acceptance Criteria

  • All known error codes produce the expected string
  • Unknown codes return a non-empty fallback
  • No test throws an unhandled exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    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