fix: resolve TypeScript errors in test files

- Add type assertions for factory options arrays
- Add 'this' type annotations to mock functions
- Fix missing required properties in test objects
- Change Mock to MockInstance for Vitest compatibility
- Add non-null assertions where needed

All 943 tests now passing
This commit is contained in:
czlonkowski
2025-07-28 20:28:45 +02:00
parent d870d0ab71
commit 41c6a29b08
9 changed files with 549 additions and 40 deletions

View File

@@ -105,7 +105,7 @@ describe('DocsMapper', () => {
// Check that it eventually tried an index.md path
expect(fs.readFile).toHaveBeenCalledTimes(6);
const calls = vi.mocked(fs.readFile).mock.calls;
const indexCalls = calls.filter(call => call[0].includes('index.md'));
const indexCalls = calls.filter(call => (call[0] as string).includes('index.md'));
expect(indexCalls.length).toBeGreaterThan(0);
});
});