TL;DR: Add an automated integration test that exercises the new server architecture end-to-end via MCP protocol.
Context
Part of Epic #35 (v0.2.0 architecture cleanup). After #39 introduces the layered architecture, an integration test verifies the full chain: client connects via stdio → tool listing → tool execution → clean shutdown. The test uses the user-facing entry point (dist/mcp/server.cjs shim) to also verify backward compatibility.
Acceptance Criteria
Scope
In Scope:
- Create
tests/integration/proxy-server.test.js using hand-rolled Node.js assertions (project convention — no test framework installed)
- Add
test:integration script to package.json
- Chromium availability check with graceful skip
- Test via
dist/mcp/server.cjs (the shim path, verifying backward compat)
Out of Scope:
- Test framework adoption (Jest, Vitest, etc.)
- Testing of local tools (none registered in Epic 1)
- Performance benchmarks (deferred to Epic 2)
Technical Implementation
- Test structure (CJS, matches project convention):
- Spawn server via
StdioClientTransport pointing at dist/mcp/server.cjs
- Connect with
Client from @modelcontextprotocol/sdk/client/index.js (already installed, v1.17.4)
- Assert
tools/list returns ≥ 20 tools (lower bound allows minor upstream version drift; PoC confirmed 23)
- Execute
browser_navigate to about:blank, browser_snapshot, browser_close
- Verify clean client disconnect
- Pre-flight: Check Chromium availability; skip test with exit 0 if not installed
- Prerequisite:
npm run build must run before test:integration (tests the built artifact)
- Directory:
tests/integration/ exists (currently empty)
Architecture Reference
From Epic #35 Architecture Decisions:
- Test uses the backward-compat shim path (
dist/mcp/server.cjs) to verify .mcp.json compatibility
Dependencies
TL;DR: Add an automated integration test that exercises the new server architecture end-to-end via MCP protocol.
Context
Part of Epic #35 (v0.2.0 architecture cleanup). After #39 introduces the layered architecture, an integration test verifies the full chain: client connects via stdio → tool listing → tool execution → clean shutdown. The test uses the user-facing entry point (
dist/mcp/server.cjsshim) to also verify backward compatibility.Acceptance Criteria
tests/integration/proxy-server.test.jscovers server start, tool listing, tool execution, and clean shutdowntest:integrationruns the test (separate fromnpm testto keep dev loop fast)Scope
In Scope:
tests/integration/proxy-server.test.jsusing hand-rolled Node.js assertions (project convention — no test framework installed)test:integrationscript topackage.jsondist/mcp/server.cjs(the shim path, verifying backward compat)Out of Scope:
Technical Implementation
StdioClientTransportpointing atdist/mcp/server.cjsClientfrom@modelcontextprotocol/sdk/client/index.js(already installed, v1.17.4)tools/listreturns ≥ 20 tools (lower bound allows minor upstream version drift; PoC confirmed 23)browser_navigatetoabout:blank,browser_snapshot,browser_closenpm run buildmust run beforetest:integration(tests the built artifact)tests/integration/exists (currently empty)Architecture Reference
From Epic #35 Architecture Decisions:
dist/mcp/server.cjs) to verify.mcp.jsoncompatibilityDependencies