You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: add missing unit tests for createCommandResult, createSubscriptionMessage and createRelayedEventMessage (#470)
These three message factory functions in src/utils/messages.ts were
exported and used across the relay but had no tests in the spec file.
- createCommandResult (NIP-20): covers success=true with empty reason
and success=false with a rejection reason string
- createSubscriptionMessage (NIP-01 REQ): covers single-filter and
multi-filter cases, verifying the spread into index positions 2+
- createRelayedEventMessage: covers both code paths — the branch that
returns a 2-element tuple when no secret is passed, and the branch
that appends the secret as a third element
Co-authored-by: Ricardo Cabral <me@ricardocabral.io>
0 commit comments