Files
cc-switch/tests/config/codexTemplates.test.ts
Kairos Duan 3c3d417457 Enable Codex goals in provider templates (#3089)
* Enable Codex goals in provider templates

* feat: add Codex goal mode toggle

- Remove forced goals=true from Codex provider presets and custom templates.
- Add a Codex provider editor switch that updates [features].goals on demand.
- Update docs, i18n, and regression coverage for the optional Goal mode flow.

---------

Co-authored-by: Jason <farion1231@gmail.com>
2026-05-27 11:31:31 +08:00

18 lines
656 B
TypeScript

import { describe, expect, it } from "vitest";
import { parse as parseToml } from "smol-toml";
import { getCodexCustomTemplate } from "@/config/codexTemplates";
describe("Codex custom templates", () => {
it("does not force Codex Goal mode in the custom provider template", () => {
const template = getCodexCustomTemplate();
const parsed = parseToml(template.config) as {
features?: { goals?: boolean };
model_providers?: Record<string, unknown>;
};
expect(template.auth).toEqual({ OPENAI_API_KEY: "" });
expect(parsed.features?.goals).toBeUndefined();
expect(parsed.model_providers?.custom).toBeDefined();
});
});