test: add unit tests for McpDocsServer and formatPageContent#25
Merged
Conversation
scalvert
force-pushed
the
sc/add-runtime-tests
branch
from
April 12, 2026 20:13
a593959 to
c1b1cd9
Compare
scalvert
force-pushed
the
sc/infra-sdk-coverage-contributing
branch
from
April 12, 2026 20:13
2a1734b to
eabddea
Compare
scalvert
force-pushed
the
sc/add-runtime-tests
branch
from
April 12, 2026 20:18
c1b1cd9 to
d728461
Compare
scalvert
force-pushed
the
sc/infra-sdk-coverage-contributing
branch
from
April 12, 2026 20:18
eabddea to
572fdb9
Compare
scalvert
force-pushed
the
sc/add-runtime-tests
branch
from
April 12, 2026 20:22
d728461 to
b611983
Compare
scalvert
force-pushed
the
sc/infra-sdk-coverage-contributing
branch
2 times, most recently
from
April 12, 2026 20:24
083a7a2 to
c749eb9
Compare
- Add tests/server-test.ts with 6 tests covering McpDocsServer: constructor (data-based and file-based configs), initialize() success and idempotency, getStatus() with correct values, default version, and pre-init state - Add tests/docs-fetch-test.ts with 6 tests covering formatPageContent: null doc, full doc with all fields, empty description, empty headings, heading level filtering (>3 excluded from TOC), TOC indentation Closes #19 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
scalvert
force-pushed
the
sc/add-runtime-tests
branch
from
April 12, 2026 20:24
b611983 to
1f9189e
Compare
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.
Summary
tests/server-test.tswith 6 tests coveringMcpDocsServer: constructor (data-based and file-based configs),initialize()success and idempotency,getStatus()with correct values, default version, and pre-init statetests/docs-fetch-test.tswith 6 tests coveringformatPageContent: null doc, full doc with all fields, empty description, empty headings, heading level filtering (>3 excluded from TOC), TOC indentationTest plan
npm testpasses (64 tests total, 12 new)Closes #19
🤖 Generated with Claude Code