Skip to content

Add unit tests for the assert_event helper correctly failing when event topic does not match #648

Description

@Chucks1093

Summary

The assert_event test helper should fail with a clear message when the transaction result contains events but none match the expected topic. Unit tests should confirm the helper fails correctly on a topic mismatch and passes on a correct topic.

Scope

  • Emit an event with topic buy and call assert_event with topic sell — assert the helper panics
  • Emit an event with topic buy and call assert_event with topic buy — assert the helper passes
  • Emit no events and call assert_event with any topic — assert the helper panics
  • Assert the panic message on topic mismatch identifies the expected and actual topics

Acceptance Criteria

  • Mismatch topic causes helper to panic
  • Panic message identifies expected and actual topics
  • No events causes helper to panic
  • Matching topic passes without panic

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions