feat: expose host element from renderHook#5
Merged
cristinecula merged 11 commits intomasterfrom Jan 22, 2026
Merged
Conversation
Fixes #4 - Added RenderHookResult interface with host property - Expose el (harness element) as host in renderHook return value - Add comprehensive tests for host element functionality - Update documentation with usage examples This enables direct testing of hooks that depend on useHost() from @neovici/cosmoz-utils, eliminating the need for wrapper components.
- Focus on event firing and listening in documentation and tests - Remove specific references to external libraries - Add comprehensive event handling test coverage - Improve terminology to be more general and focused on host element access
- Remove hook and Hook imports from @pionjs/pion - Replace custom hooks with simple useSimple hook - Simplify tests to focus on host property functionality - Maintain comprehensive event handling test coverage
- Export RenderResult type from result.ts - Fix TypeScript type errors in test file - Add lit-html as production dependency
- Replace single main.yml with modular workflow structure - Add ci.yml for build/test automation - Add automerge.yml for automatic PR merging - Support both master and main branches
Contributor
|
@megheaiulian there is a build failure |
The test incorrectly expected event listeners to be automatically removed when unmounting. Event listeners on a DOM element persist after the element is disconnected from the DOM. If automatic cleanup is needed, it should be implemented explicitly in the renderHook function.
cristinecula
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose host element from renderHook.
Fixes #4