mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-20 09:23:07 +00:00
feat(validator): detect broken/malformed workflow connections (#620)
Add comprehensive connection validation: unknown output keys with fix suggestions, invalid type field detection, output/input index bounds checking, and BFS-based trigger reachability analysis replacing simple orphan detection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -646,9 +646,10 @@ describe('WorkflowValidator - Mock-based Unit Tests', () => {
|
||||
await validator.validateWorkflow(workflow as any);
|
||||
|
||||
// Should have called getNode for each node type (normalized to short form)
|
||||
// Called during node validation + output/input index bounds checking
|
||||
expect(mockGetNode).toHaveBeenCalledWith('nodes-base.httpRequest');
|
||||
expect(mockGetNode).toHaveBeenCalledWith('nodes-base.set');
|
||||
expect(mockGetNode).toHaveBeenCalledTimes(2);
|
||||
expect(mockGetNode.mock.calls.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
it('should handle repository errors gracefully', async () => {
|
||||
|
||||
Reference in New Issue
Block a user