Skip to content

test(hooks): add test coverage for directory-readme-injector hook#4518

Open
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:test/directory-readme-injector-hook-coverage
Open

test(hooks): add test coverage for directory-readme-injector hook#4518
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:test/directory-readme-injector-hook-coverage

Conversation

@Hungdoan565

@Hungdoan565 Hungdoan565 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Add hook.test.ts for the directory-readme-injector hook testing the hook factory wrapper (distinct from the existing injector.test.ts which tests the injector function directly).

New tests cover:

  • Hook factory returns correct handler keys
  • tool.execute.before delegates to injector
  • event handler for session.deleted cleanup
  • Disabled hook skips processing

Summary by cubic

Add src/hooks/directory-readme-injector/hook.test.ts to test the directory README injector hook factory. Covers Read delegation (case-insensitive), ignores other tools, clears cache on session.deleted/compacted, no-ops for unrelated events or missing sessionID; also syncs bun.lock platform binary versions to 4.5.1.

Written for commit 9974e5f. 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