Files
henry 15e49cb0f9
Run Tests / test (push) Failing after 8s
feat(tests): update Alpaca API tests to include range parameters and improve stock database cleanup
- Modified Alpaca Historical Bars tests to include range parameters in API requests.
- Updated test descriptions for clarity.
- Added cleanup step to delete test ticker after verification in stock database tests.
- Adjusted Vitest configuration to exclude test files from coverage.
2026-05-14 16:46:28 +02:00

27 lines
991 B
TypeScript

import { describe, it, expect } from "vitest";
import { OpenRouterClient } from "../openrouter";
describe("OpenRouterClient", () => {
it("should create instance with API key", () => {
const client = new OpenRouterClient("test-api-key");
expect(client).toBeInstanceOf(OpenRouterClient);
});
it("should have default free models list", () => {
const client = new OpenRouterClient("test-api-key");
const models = client.getFreeModels();
expect(models.length).toBeGreaterThan(0);
expect(models).toContain("openai/gpt-oss-120b:free");
});
it("should have available model providers", () => {
const client = new OpenRouterClient("test-api-key");
const providers = client.getProviders();
expect(providers).toContain("openai");
expect(providers).toContain("google");
expect(providers).toContain("anthropic");
expect(providers).toContain("deepseek");
expect(providers).toContain("meta");
expect(providers).toContain("xai");
});
});