mirror of
https://github.com/yamadashy/repomix.git
synced 2026-01-28 15:08:22 +01:00
Vitest v4 changed how vi.fn() and vi.mock() work with class constructors. Arrow functions in mockImplementation no longer work as constructors when called with 'new' keyword. Changes: - Use regular function syntax instead of arrow functions for constructor mocks - Use vi.hoisted() to define class mocks that can be used in vi.mock() factories - Replace vi.fn().mockReturnValue() with vi.fn().mockImplementation() for class mocks - Update mock instance retrieval to use vi.mocked().mock.results[0].value