josharsh / josharsh/webmcp-tools
Test coverage for navigator.modelContext host shape
Open
good first issue
help wanted
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Host detection (`packages/core/src/host.ts`) accepts both `document.modelContext` (current spec) and `navigator.modelContext` (older shape), but only the document path has direct test coverage.
## Task
Tests in `packages/core/src/` (happy-dom):
- fake `navigator.modelContext` present, `document.modelContext` absent → `hasNativeWebMCP()` true, `tool()` registers against it, no ponyfill installed
- both present → document wins
- clean up globals in afterEach (see existing `tool.test.ts` patterns)
Contributor guide
Assessment
This issue has not been assessed yet.