test(TLS 驗證): 補上憑證忽略行為測試

This commit is contained in:
2026-06-26 09:20:57 +00:00
parent bc0df06445
commit 2fe03e94f0
3 changed files with 8 additions and 0 deletions
+1
View File
@@ -82,6 +82,7 @@ describe('fetchAccountQuota', () => {
const get = async (url, opts) => {
assert.match(url, /openrouter\.ai\/api\/v1\/auth\/key$/);
assert.equal(opts.headers.Authorization, 'Bearer sk-or-xxx');
assert.equal(opts.httpsAgent.options.rejectUnauthorized, false);
return { data: { data: { usage: 12.4, limit: 100, limit_remaining: 87.6 } } };
};
const q = await fetchAccountQuota('openai', { apiKeys: ['sk-or-xxx'], baseURL: 'https://openrouter.ai/api/v1' }, { get });