Skip to content

test(connectors): cover MCP JSON field readers and withoutTrailingSlash (#265) - #273

Merged
juancguerrerodev merged 2 commits into
DojoCodingLabs:mainfrom
viditjain25:test/mcp-json-url
Dec 6, 2026
Merged

juancguerrerodev merged 2 commits into
DojoCodingLabs:mainfrom
viditjain25:test/mcp-json-url

Conversation

@viditjain25

@viditjain25 viditjain25 commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Closes #265.

Adds unit tests in packages/connectors/test/mcp-url.test.ts covering str, strArr, and bool from packages/connectors/src/mcp/json.ts, and withoutTrailingSlash from packages/connectors/src/mcp/url.ts. No production source files were modified.

Vision fit

Serves Principle 7 (Small, typed and tested) by closing test coverage gaps in the pure TypeScript @hermit/connectors package (verifying own-property Object.hasOwn guards, primitive filtering, trailing single-slash stripping, query preservation, and double-slash behavior).

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: #

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. (Package-scoped and repo gates run on Windows Node v22.19.0 below: pnpm check:privacy, pnpm lint (eslint .), node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt, @hermit/connectors typecheck, and @hermit/connectors vitest run (19 files, 349 passed, including mcp-url.test.ts 39 passed) all passed. Root pnpm typecheck hit apps/site missing React/Next types in this local setup and root scripts/devices/table.test.mjs flagged docs/devices.md CRLF line endings; packages/connectors/src/mcp/json.ts and packages/connectors/src/mcp/url.ts were not modified.)
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. (n/a - test-only change)
  • Tests, fixtures and screenshots use made-up data only.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.
Light Deep sea
es-419
en

New dependencies and network calls

n/a

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Gemini/Antigravity coding assistant drafted the two new describe blocks in packages/connectors/test/mcp-url.test.ts and ran the local Vitest, ESLint, privacy check, and PR guard commands.
  • I read and ran everything in this pull request, and I can explain it.

@juancguerrerodev

Copy link
Copy Markdown
Contributor

Thanks, the tests look good! Please fill in the pull request template (including "I read and ran everything", and the AI agent if one helped) so it can merge. 🦀

@viditjain25

Copy link
Copy Markdown
Contributor Author

Updated the PR description with the full repository pull request template (including verified check outputs and the AI-agent disclosure + read/ran confirmation). Thanks for the review @juancguerrerodev!

@juancguerrerodev
juancguerrerodev merged commit ff1a6a2 into DojoCodingLabs:main Dec 6, 2026
4 checks passed
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.

MCP: test the JSON field readers and withoutTrailingSlash

3 participants