Initialize project and ignore local references
This commit is contained in:
1 parent
a11ac3eaba
commit
2af82b6bb3
132 files changed
+29426
No files matched your search
@@ -0,0 +1,37 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildDefaultConnectorRows, parseEnvBindingText } from "../../src/main/connectors";
|
||||
|
||||
describe("parseEnvBindingText", () => {
|
||||
it("ignores comments and blank lines while preserving values with equals", () => {
|
||||
expect(
|
||||
parseEnvBindingText(`
|
||||
# comment
|
||||
OPENAI_API_KEY=vault-openai
|
||||
|
||||
CUSTOM=value=with=equals
|
||||
`),
|
||||
).toEqual({
|
||||
OPENAI_API_KEY: "vault-openai",
|
||||
CUSTOM: "value=with=equals",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildDefaultConnectorRows", () => {
|
||||
it("keeps security-sensitive commands pinned to connector defaults", () => {
|
||||
const [codex] = buildDefaultConnectorRows([
|
||||
{
|
||||
id: "codex_local",
|
||||
command: "/usr/local/bin/codex",
|
||||
status: "ready",
|
||||
notes: "custom note",
|
||||
},
|
||||
]);
|
||||
|
||||
expect(codex.id).toBe("codex_local");
|
||||
expect(codex.command).toBe("codex");
|
||||
expect(codex.status).toBe("ready");
|
||||
expect(codex.notes).toBe("custom note");
|
||||
expect(codex.capabilityMatrix.structuredTranscript).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user