Conversation
|
Thank you for this — and apologies it sat for so long. The repository has moved since March: it now uses vitest with a The server factory. The trimmed, shared argument schemas. Rejecting blank and whitespace-only values at the schema is the right call: an empty Your server-registration tests are adapted into Closing in favour of #28, with the credit recorded in the commit message and the changelog rather than lost. Sorry again for the delay, and thank you for the contribution. |
|
Correction to the count above: it is 83 argument schemas across the tool modules, not 76. |
|
Closing as harvested — the detail is in my earlier comment. Both ideas are on
Your server-registration tests are adapted into Thank you, and sorry again that it sat so long. |
Summary
This PR adds an initial automated smoke test setup for
reactome-mcp.The main thing I wanted to do here was add a lightweight way to catch breakage in the MCP surface without relying on manual Inspector testing or live Reactome service calls every time. To make that possible, I pulled server construction into a small shared factory that can be used both by the runtime entrypoint and by tests.
Included in this PR
src/server.tsso the MCP server can be created in tests without starting stdiosrc/index.tsto use the shared server construction pathbuild:test/testscriptsdist-test/node:testCurrent test coverage
The suite currently checks:
server initialization
representative tool/resource/template registration
mocked smoke tests for:
reactome_searchreactome_get_pathwayreactome_get_analysis_resultinvalid blank query/token cases
representative static and templated resource handling
Notes
The tests stub the content and analysis client boundaries so they stay fast and deterministic.
I also tightened validation a bit for blank search queries and analysis tokens, mainly so those failure cases are clearer and easier to cover in tests.
Verified
npm run buildnpm test