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:
czlonkowski
2025-10-24 10:47:49 +02:00
parent 04e7c53b59
commit 5ea00e12a2

View File

@@ -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);
});