| ... | ... | @@ -2,11 +2,7 @@ import { describe, expect, it } from "vite-plus/test"; |
| 2 | 2 | |
| 3 | 3 | import type { ModelCapabilities } from "@t3tools/contracts"; |
| 4 | 4 | |
| 5 | | import { |
| 6 | | applyProviderOptionSelection, |
| 7 | | providerOptionValueLabels, |
| 8 | | resolveProviderOptionDescriptors, |
| 9 | | } from "./providerOptions"; |
| 5 | import { applyProviderOptionSelection, resolveProviderOptionDescriptors } from "./providerOptions"; |
| 10 | 6 | |
| 11 | 7 | const CODEX_CAPABILITIES: ModelCapabilities = { |
| 12 | 8 | optionDescriptors: [ |
| ... | ... | @@ -34,15 +30,6 @@ const CODEX_CAPABILITIES: ModelCapabilities = { |
| 34 | 30 | }; |
| 35 | 31 | |
| 36 | 32 | describe("mobile provider options", () => { |
| 37 | | it("summarizes the option values currently in effect", () => { |
| 38 | | const descriptors = resolveProviderOptionDescriptors({ |
| 39 | | capabilities: CODEX_CAPABILITIES, |
| 40 | | selections: undefined, |
| 41 | | }); |
| 42 | | |
| 43 | | expect(providerOptionValueLabels(descriptors)).toEqual(["Medium", "Standard"]); |
| 44 | | }); |
| 45 | | |
| 46 | 33 | it("updates generic select options without knowing provider-specific ids", () => { |
| 47 | 34 | const descriptors = resolveProviderOptionDescriptors({ |
| 48 | 35 | capabilities: CODEX_CAPABILITIES, |
| ... | ... | @@ -62,7 +49,7 @@ describe("mobile provider options", () => { |
| 62 | 49 | expect(applyProviderOptionSelection(descriptors, { id: "unknown", value: "high" })).toBeNull(); |
| 63 | 50 | }); |
| 64 | 51 | |
| 65 | | it("treats an unspecified boolean capability as off", () => { |
| 52 | it("updates generic boolean options", () => { |
| 66 | 53 | const descriptors = resolveProviderOptionDescriptors({ |
| 67 | 54 | capabilities: { |
| 68 | 55 | optionDescriptors: [{ id: "fastMode", label: "Fast Mode", type: "boolean" }], |
| ... | ... | @@ -70,7 +57,6 @@ describe("mobile provider options", () => { |
| 70 | 57 | selections: undefined, |
| 71 | 58 | }); |
| 72 | 59 | |
| 73 | | expect(providerOptionValueLabels(descriptors)).toEqual([]); |
| 74 | 60 | expect(applyProviderOptionSelection(descriptors, { id: "fastMode", value: true })).toEqual([ |
| 75 | 61 | { id: "fastMode", value: true }, |
| 76 | 62 | ]); |