josharsh / josharsh/webmcp-tools

Test coverage for navigator.modelContext host shape

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.