Skip to content

test: add unit tests for RuntimeEventBus subscribe/unsubscribe semantics (Issue #151) - #187

Open
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-151-eventbus-subscribe-unsubscribe
Open

test: add unit tests for RuntimeEventBus subscribe/unsubscribe semantics (Issue #151)#187
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-151-eventbus-subscribe-unsubscribe

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds dedicated unit tests for RuntimeEventBus subscribe/unsubscribe semantics in src/events/runtime-events.ts.

Tests Added

  • ✅ Listener receives events for its registered name
  • ✅ Unsubscribe stops delivery immediately
  • ✅ Duplicate listener references deduplicated (Set semantics)
  • ✅ Listeners for other event names never invoked
  • ✅ Multiple listeners on same event with independent unsubscribe

Verification

All 5 tests pass locally via npx vitest run tests/events/runtime-events.test.ts.

Closes #151

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.

[Bounty: $75] Add unit tests for RuntimeEventBus subscribe/unsubscribe semantics

1 participant