mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: update integration tests to use valid tools after v2.25.0 removal
Replaced all references to removed tools in integration tests: - list_nodes -> search_nodes - get_database_statistics -> tools_documentation - list_ai_tools -> search_nodes/tools_documentation - list_tasks -> tools_documentation - get_node_as_tool_info -> removed test section Updated test files: - tests/integration/mcp-protocol/basic-connection.test.ts - tests/integration/mcp-protocol/performance.test.ts - tests/integration/mcp-protocol/session-management.test.ts - tests/integration/mcp-protocol/test-helpers.ts - tests/integration/mcp-protocol/tool-invocation.test.ts - tests/integration/telemetry/mcp-telemetry.test.ts - tests/unit/mcp/disabled-tools.test.ts - tests/unit/mcp/tools-documentation.test.ts Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -73,14 +73,14 @@ describe('Disabled Tools Feature (Issue #410)', () => {
|
||||
});
|
||||
|
||||
it('should parse multiple disabled tools correctly', () => {
|
||||
process.env.DISABLED_TOOLS = 'n8n_diagnostic,n8n_health_check,list_nodes';
|
||||
process.env.DISABLED_TOOLS = 'n8n_diagnostic,n8n_health_check,search_nodes';
|
||||
server = new TestableN8NMCPServer();
|
||||
const disabledTools = server.testGetDisabledTools();
|
||||
|
||||
expect(disabledTools.size).toBe(3);
|
||||
expect(disabledTools.has('n8n_diagnostic')).toBe(true);
|
||||
expect(disabledTools.has('n8n_health_check')).toBe(true);
|
||||
expect(disabledTools.has('list_nodes')).toBe(true);
|
||||
expect(disabledTools.has('search_nodes')).toBe(true);
|
||||
});
|
||||
|
||||
it('should trim whitespace from tool names', () => {
|
||||
@@ -94,14 +94,14 @@ describe('Disabled Tools Feature (Issue #410)', () => {
|
||||
});
|
||||
|
||||
it('should filter out empty entries from comma-separated list', () => {
|
||||
process.env.DISABLED_TOOLS = 'n8n_diagnostic,,n8n_health_check,,,list_nodes';
|
||||
process.env.DISABLED_TOOLS = 'n8n_diagnostic,,n8n_health_check,,,search_nodes';
|
||||
server = new TestableN8NMCPServer();
|
||||
const disabledTools = server.testGetDisabledTools();
|
||||
|
||||
expect(disabledTools.size).toBe(3);
|
||||
expect(disabledTools.has('n8n_diagnostic')).toBe(true);
|
||||
expect(disabledTools.has('n8n_health_check')).toBe(true);
|
||||
expect(disabledTools.has('list_nodes')).toBe(true);
|
||||
expect(disabledTools.has('search_nodes')).toBe(true);
|
||||
});
|
||||
|
||||
it('should handle single comma correctly', () => {
|
||||
|
||||
@@ -49,7 +49,7 @@ vi.mock('@/mcp/tool-docs', () => ({
|
||||
performance: 'Instant - uses in-memory index',
|
||||
bestPractices: ['Start with single words', 'Use FUZZY for uncertain names'],
|
||||
pitfalls: ['Overly specific queries may return no results'],
|
||||
relatedTools: ['list_nodes', 'get_node_info']
|
||||
relatedTools: ['get_node', 'get_node_documentation']
|
||||
}
|
||||
},
|
||||
validate_workflow: {
|
||||
@@ -172,7 +172,7 @@ describe('tools-documentation', () => {
|
||||
expect(doc).toContain('## Common Pitfalls');
|
||||
expect(doc).toContain('- Overly specific queries');
|
||||
expect(doc).toContain('## Related Tools');
|
||||
expect(doc).toContain('- list_nodes');
|
||||
expect(doc).toContain('- get_node');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user