28 lines
641 B
Go
28 lines
641 B
Go
package presets
|
|
|
|
import "testing"
|
|
|
|
func TestPresetsCarryCodexModelExtras(t *testing.T) {
|
|
for _, p := range All {
|
|
for _, name := range []string{"gpt-5-codex", "gpt-5", "codex-mini-latest"} {
|
|
got, ok := p.Models.Extra[name]
|
|
if !ok {
|
|
t.Errorf("preset %q has no extra mapping for %q", p.Key, name)
|
|
continue
|
|
}
|
|
if got != p.Models.Default {
|
|
t.Errorf("preset %q maps %q to %q, want %q", p.Key, name, got, p.Models.Default)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestByKey(t *testing.T) {
|
|
if _, ok := ByKey("deepseek"); !ok {
|
|
t.Error("deepseek preset missing")
|
|
}
|
|
if _, ok := ByKey("nope"); ok {
|
|
t.Error("unknown preset resolved")
|
|
}
|
|
}
|