Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix: cast HeadersInit for TypeScript strict mode

alvinlollo576a99449d37
diff --git a/src/core/capture/ai/__tests__/validate.test.ts b/src/core/capture/ai/__tests__/validate.test.ts
index 07ec3bc..9d89a89 100644
--- a/src/core/capture/ai/__tests__/validate.test.ts
+++ b/src/core/capture/ai/__tests__/validate.test.ts
@@ -71,7 +71,7 @@ describe('validateApiKey', () => {
expect(await validateApiKey('groq', 'gsk-key')).toEqual({ valid: true, models: ['ok-model'] });
const [url, init] = fetchMock.mock.calls[0];
expect(url).toBe('https://api.groq.com/openai/v1/models');
- expect(init!.headers.Authorization).toBe('Bearer gsk-key');
+ expect((init!.headers as Record<string, string>).Authorization).toBe('Bearer gsk-key');
});
it('checks a deepseek key against deepseek, not openai', async () => {
@@ -79,7 +79,7 @@ describe('validateApiKey', () => {
expect(await validateApiKey('deepseek', 'sk-deepseek')).toEqual({ valid: true, models: ['deepseek-v4-flash'] });
const [url, init] = fetchMock.mock.calls[0];
expect(url).toBe('https://api.deepseek.com/models');
- expect(init!.headers.Authorization).toBe('Bearer sk-deepseek');
+ expect((init!.headers as Record<string, string>).Authorization).toBe('Bearer sk-deepseek');
});
it('gives up rather than spinning forever when a host never answers', async () => {