Skip to content

test: add unit tests for frontmatter, prefix-logger, and MCP tools - #788

Open
nishant264 wants to merge 1 commit into
rowboatlabs:mainfrom
nishant264:tests/mcp-eval-and-utility-coverage
Open

test: add unit tests for frontmatter, prefix-logger, and MCP tools#788
nishant264 wants to merge 1 commit into
rowboatlabs:mainfrom
nishant264:tests/mcp-eval-and-utility-coverage

Conversation

@nishant264

Copy link
Copy Markdown

This PR adds test coverage for three areas that were previously untested:

packages/shared — Frontmatter parsing (28 tests)

  • Edge cases: no frontmatter, empty string, bare ---, missing closing delimiter
  • Key-value pairs with whitespace, colons in values, spaces in keys
  • List values and non-list indented lines
  • Body extraction with leading newlines and empty body
  • Frontmatter --- delimiter appearing inside body content

packages/shared — PrefixLogger (11 tests)

  • Root logging with and without arguments
  • Child logger delegation (1 and 3 levels deep)
  • Empty prefix, special characters, sibling independence
  • Root vs child isolation

packages/core — MCP builtin tools (15 tests)

  • executeMcpTool: success, empty args, error surfacing, error hints
  • listMcpTools: tool listing, pagination cursor, error handling
  • listMcpServers: server states, empty list, error handling
  • addMcpServer: valid stdio/HTTP config, schema validation errors, repo error propagation

Test results

  • packages/shared: 146/146 tests passing
  • packages/core: 548/548 tests passing
  • Typecheck: clean in both packages

No source logic was modified — only test files were added.

@nishant264

Copy link
Copy Markdown
Author

Hi folks! 👋 Just bumping this PR in case it got buried.

These tests add coverage for frontmatter parsing, prefix-logger, and MCP builtin tools — 39 new tests across 3 files. All passing locally (146/146 in shared, 548/548 in core). No source logic was modified.

Would love a review when anyone has time. Happy to make any changes requested!

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