| ... | @@ -2,11 +2,7 @@ import { describe, expect, it } from "vite-plus/test"; | ... | @@ -2,11 +2,7 @@ import { describe, expect, it } from "vite-plus/test"; |
| 2 | | 2 | |
| 3 | import type { ModelCapabilities } from "@t3tools/contracts"; | 3 | import type { ModelCapabilities } from "@t3tools/contracts"; |
| 4 | | 4 | |
| 5 | import { | 5 | import { applyProviderOptionSelection, resolveProviderOptionDescriptors } from "./providerOptions"; |
| 6 | applyProviderOptionSelection, | | |
| 7 | providerOptionValueLabels, | | |
| 8 | resolveProviderOptionDescriptors, | | |
| 9 | } from "./providerOptions"; | | |
| 10 | | 6 | |
| 11 | const CODEX_CAPABILITIES: ModelCapabilities = { | 7 | const CODEX_CAPABILITIES: ModelCapabilities = { |
| 12 | optionDescriptors: [ | 8 | optionDescriptors: [ |
| ... | @@ -34,15 +30,6 @@ const CODEX_CAPABILITIES: ModelCapabilities = { | ... | @@ -34,15 +30,6 @@ const CODEX_CAPABILITIES: ModelCapabilities = { |
| 34 | }; | 30 | }; |
| 35 | | 31 | |
| 36 | describe("mobile provider options", () => { | 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 | it("updates generic select options without knowing provider-specific ids", () => { | 33 | it("updates generic select options without knowing provider-specific ids", () => { |
| 47 | const descriptors = resolveProviderOptionDescriptors({ | 34 | const descriptors = resolveProviderOptionDescriptors({ |
| 48 | capabilities: CODEX_CAPABILITIES, | 35 | capabilities: CODEX_CAPABILITIES, |
| ... | @@ -62,7 +49,7 @@ describe("mobile provider options", () => { | ... | @@ -62,7 +49,7 @@ describe("mobile provider options", () => { |
| 62 | expect(applyProviderOptionSelection(descriptors, { id: "unknown", value: "high" })).toBeNull(); | 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 | const descriptors = resolveProviderOptionDescriptors({ | 53 | const descriptors = resolveProviderOptionDescriptors({ |
| 67 | capabilities: { | 54 | capabilities: { |
| 68 | optionDescriptors: [{ id: "fastMode", label: "Fast Mode", type: "boolean" }], | 55 | optionDescriptors: [{ id: "fastMode", label: "Fast Mode", type: "boolean" }], |
| ... | @@ -70,7 +57,6 @@ describe("mobile provider options", () => { | ... | @@ -70,7 +57,6 @@ describe("mobile provider options", () => { |
| 70 | selections: undefined, | 57 | selections: undefined, |
| 71 | }); | 58 | }); |
| 72 | | 59 | |
| 73 | expect(providerOptionValueLabels(descriptors)).toEqual([]); | | |
| 74 | expect(applyProviderOptionSelection(descriptors, { id: "fastMode", value: true })).toEqual([ | 60 | expect(applyProviderOptionSelection(descriptors, { id: "fastMode", value: true })).toEqual([ |
| 75 | { id: "fastMode", value: true }, | 61 | { id: "fastMode", value: true }, |
| 76 | ]); | 62 | ]); |