Skip to main content
Glama
config.test.ts761 B
import { describe, expect, it } from "vitest"; import { parseConfig } from "./config.js"; function env(vars: Record<string, string | undefined>): NodeJS.ProcessEnv { return { ...process.env, ...vars } as NodeJS.ProcessEnv; } describe("parseConfig", () => { it("prefers --hevy-api-key= over env", () => { const cfg = parseConfig( ["--hevy-api-key=cliKey"], env({ HEVY_API_KEY: "envKey" }), ); expect(cfg.apiKey).toBe("cliKey"); }); it("supports bare hevy-api-key= form", () => { const cfg = parseConfig(["hevy-api-key=bareKey"], env({})); expect(cfg.apiKey).toBe("bareKey"); }); it("falls back to env HEVY_API_KEY", () => { const cfg = parseConfig([], env({ HEVY_API_KEY: "envOnly" })); expect(cfg.apiKey).toBe("envOnly"); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisdoc/hevy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server