Added missing test coverage from code review feedback: - encryption-utils.test.ts: * Added error handling tests for encryptApiKey fallback to plaintext * Added error handling tests for decryptApiKey throwing on failure * Added tests for isEncryptionAvailable function * Achieved 100% coverage on all metrics - auth-utils.test.ts (new file): * Added comprehensive tests for generateApiKey function * Added validation tests for validateApiKey function * Tests edge cases: empty keys, short keys, null/undefined * Achieved 100% coverage on all metrics All tests pass (569 tests). Overall coverage improved: - auth-utils.ts: 100% statements, 100% branches, 100% functions - encryption-utils.ts: 100% statements, 100% branches, 100% functions
3.2 KiB
3.2 KiB