Issue Description
While reviewing the codebase, several critical and high-priority bugs were identified and filed as separate issues. In addition to those bugs, this issue tracks important test coverage gaps that need to be addressed.
Critical Untested Code Paths
| File |
Function |
Lines |
Issue |
update-mcp.js |
processTool |
58-162 |
Entire function untested — core business logic with version mutation |
update-mcp.js |
main |
168-286 |
Full orchestration untested |
update-extensions.js |
main |
147-258 |
Full orchestration untested |
registry.js |
_loadToolModules |
8-13 |
Dynamic module loader untested |
cursor.js |
parseMcpServers(null) |
24 |
Null guard crash path untested |
Key Missing Test Scenarios
For processTool:
- Config file missing (parse_error)
tool.parseMcpServers() throws
- npm registry returns 404, 429
- Version already current
- Version updated successfully
- Config write fails (write_error)
- All servers non-npx (no writes, empty update)
For npm-resolver:
- Invalid JSON on HTTP 200 response (line 112)
Recommendation
Add integration tests for update-mcp.js and update-extensions.js using mock tool modules and mock fs/https to cover the orchestration layer. processTool should be the highest priority.
Issue Description
While reviewing the codebase, several critical and high-priority bugs were identified and filed as separate issues. In addition to those bugs, this issue tracks important test coverage gaps that need to be addressed.
Critical Untested Code Paths
update-mcp.jsprocessToolupdate-mcp.jsmainupdate-extensions.jsmainregistry.js_loadToolModulescursor.jsparseMcpServers(null)Key Missing Test Scenarios
For
processTool:tool.parseMcpServers()throwsFor
npm-resolver:Recommendation
Add integration tests for
update-mcp.jsandupdate-extensions.jsusing mock tool modules and mockfs/httpsto cover the orchestration layer.processToolshould be the highest priority.