Skip to content

test(hooks): add test coverage for background-notification hook#4516

Open
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:test/background-notification-hook-coverage
Open

test(hooks): add test coverage for background-notification hook#4516
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:test/background-notification-hook-coverage

Conversation

@Hungdoan565

@Hungdoan565 Hungdoan565 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Add tests for the �ackground-notification hook covering the chat.message handler and event forwarding behavior.

New tests added:

  • chat.message handler: skip when no background tasks, notify on completion
  • event handler: session.deleted cleanup, session.idle forwarding
  • dispose: cleanup on session end

Summary by cubic

Add unit tests for the background-notification hook to verify chat message notification injection and event forwarding. Covers session.idle/error/deleted, message.updated, and session.next.tool_call.delta, and ignores unknown events.

  • Dependencies
    • Sync bun.lock with package.json to bump oh-my-opencode platform binaries to 4.5.1.

Written for commit 83d343e. Summary will update on new commits. Review in cubic

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.

1 participant