Co-authored-by: Claude Opus 4.7 <[email protected]> Co-authored-by: codex <[email protected]>
22 lines
689 B
TypeScript
22 lines
689 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { mergeProviderInstanceEnvironment } from "./ProviderInstanceEnvironment.ts";
|
|
|
|
describe("mergeProviderInstanceEnvironment", () => {
|
|
it("overrides inherited environment values and preserves empty strings", () => {
|
|
expect(
|
|
mergeProviderInstanceEnvironment(
|
|
[
|
|
{ name: "OPENROUTER_API_KEY", value: "sk-or-test", sensitive: true },
|
|
{ name: "ANTHROPIC_API_KEY", value: "", sensitive: false },
|
|
],
|
|
{ ANTHROPIC_API_KEY: "inherited", PATH: "/bin" },
|
|
),
|
|
).toMatchObject({
|
|
OPENROUTER_API_KEY: "sk-or-test",
|
|
ANTHROPIC_API_KEY: "",
|
|
PATH: "/bin",
|
|
});
|
|
});
|
|
});
|