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

@@ -65,11 +65,11 @@ describe('Database Adapter - Unit Tests', () => {
get: vi.fn(),
all: vi.fn(() => []),
iterate: vi.fn(function* () {}),
pluck: vi.fn(function() { return this as any; }),
expand: vi.fn(function() { return this as any; }),
raw: vi.fn(function() { return this as any; }),
pluck: vi.fn(function(this: any) { return this; }),
expand: vi.fn(function(this: any) { return this; }),
raw: vi.fn(function(this: any) { return this; }),
columns: vi.fn(() => []),
bind: vi.fn(function() { return this as any; })
bind: vi.fn(function(this: any) { return this; })
};
expect(mockStmt).toBeDefined();