Skip to content

test: add event bus listener removal mid-emit tests (Issue #131) - #188

Open
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-131-mid-emit-unsubscribe
Open

test: add event bus listener removal mid-emit tests (Issue #131)#188
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-131-mid-emit-unsubscribe

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds tests verifying RuntimeEventBus behavior when a listener unsubscribes another listener during emission.

Tests Added

  • ✅ Unsubscribing another listener mid-emit does not break iteration
  • ✅ Removed listener never fires on subsequent emissions
  • ✅ Remaining listeners continue to fire after mid-emit unsubscribe

Verification

All 3 tests pass locally via npx vitest run tests/events/mid-emit-unsubscribe.test.ts.

Closes #131

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: $40] Add test for event bus listener removal mid-emit

1 participant