mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
fix: Mock getNodeVersions in workflow-auto-fixer tests
Add missing mock for getNodeVersions() method in WorkflowAutoFixer tests. This fixes 6 failing tests that were encountering undefined values when NodeVersionService attempted to query node versions. The tests now properly mock the repository method to return an empty array, allowing the version service to handle the "no versions available" case gracefully. Fixes #359 CI test failures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
This commit is contained in:
@@ -35,6 +35,10 @@ describe('WorkflowAutoFixer', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
mockRepository = new NodeRepository({} as any);
|
||||
|
||||
// Mock getNodeVersions to return empty array (no versions available)
|
||||
vi.spyOn(mockRepository, 'getNodeVersions').mockReturnValue([]);
|
||||
|
||||
autoFixer = new WorkflowAutoFixer(mockRepository);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user