fix: resolve LRU cache test failures and TypeScript linting errors

- Fix module resolution issues in LRU cache tests by using proper vi.mock() with importActual
- Fix mock call count expectations by using valid API keys instead of empty strings
- Add explicit types to test objects to resolve TypeScript linting errors
- Change logger mock types to 'any' to avoid complex type issues
- Add vi.clearAllMocks() for proper test isolation

All tests now pass and TypeScript linting succeeds without errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-09-19 20:33:05 +02:00
parent 7e76369d2a
commit 05eec1cc81
3 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ vi.mock('../../../src/types/instance-context', async () => {
describe('LRU Cache Behavior Tests', () => {
let mockN8nApiClient: Mock;
let mockGetN8nApiConfigFromContext: Mock;
let mockLogger: Mock;
let mockLogger: any; // Logger mock has complex type
let mockValidateInstanceContext: Mock;
beforeEach(() => {