Skip to content

Test/add initial smoke tests#5

Open
adidev001 wants to merge 5 commits intoreactome:mainfrom
adidev001:test/add-initial-smoke-tests
Open

Test/add initial smoke tests#5
adidev001 wants to merge 5 commits intoreactome:mainfrom
adidev001:test/add-initial-smoke-tests

Conversation

@adidev001
Copy link
Copy Markdown

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

  • added src/server.ts so the MCP server can be created in tests without starting stdio
  • updated src/index.ts to use the shared server construction path
  • added a separate TypeScript config for tests
  • added build:test / test scripts
  • ignored dist-test/
  • added a small smoke test suite using node:test

Current test coverage

The suite currently checks:

  • server initialization

  • representative tool/resource/template registration

  • mocked smoke tests for:

    • reactome_search
    • reactome_get_pathway
    • reactome_get_analysis_result
  • invalid 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 build
  • npm test

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