5e156e50b2
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
114 lines
4.3 KiB
Plaintext
114 lines
4.3 KiB
Plaintext
bun test v1.3.12 (700fc117)
|
|
|
|
packages/prompts-core/src/variant-resolver.test.ts:
|
|
S1 actual: __red__
|
|
27 | // when
|
|
28 | const actual = resolveVariant({ modelID: "claude-opus-4-7", variants })
|
|
29 |
|
|
30 | // then
|
|
31 | console.info("S1 actual:", actual)
|
|
32 | expect(actual).toBe("default")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "default"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:32:22)
|
|
(fail) resolveVariant > #given declared model variants > #when claude opus has no model match #then returns default fallback [0.39ms]
|
|
S2 actual: __red__
|
|
43 | // when
|
|
44 | const actual = resolveVariant({ modelID: "openai/gpt-5.5", variants })
|
|
45 |
|
|
46 | // then
|
|
47 | console.info("S2 actual:", actual)
|
|
48 | expect(actual).toBe("gpt")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "gpt"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:48:22)
|
|
(fail) resolveVariant > #given declared model variants > #when openai gpt model matches #then returns gpt [0.10ms]
|
|
S3 actual: __red__
|
|
59 | // when
|
|
60 | const actual = resolveVariant({ modelID: "google/gemini-3-1-pro", variants })
|
|
61 |
|
|
62 | // then
|
|
63 | console.info("S3 actual:", actual)
|
|
64 | expect(actual).toBe("gemini")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "gemini"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:64:22)
|
|
(fail) resolveVariant > #given declared model variants > #when google gemini model matches #then returns gemini [0.04ms]
|
|
S4 actual: __red__
|
|
80 | variants,
|
|
81 | })
|
|
82 |
|
|
83 | // then
|
|
84 | console.info("S4 actual:", actual)
|
|
85 | expect(actual).toBe("planner")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "planner"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:85:22)
|
|
(fail) resolveVariant > #given agent and fallback variants > #when agent and model both match #then declared agent variant wins [0.12ms]
|
|
S5 actual: __red__
|
|
94 | // when
|
|
95 | const actual = resolveVariant({ variants })
|
|
96 |
|
|
97 | // then
|
|
98 | console.info("S5 actual:", actual)
|
|
99 | expect(actual).toBe("default")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "default"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:99:22)
|
|
(fail) resolveVariant > #given agent and fallback variants > #when no context is provided #then returns default fallback [0.08ms]
|
|
S6 actual: __red__
|
|
109 | // when
|
|
110 | const actual = resolveVariant({ modelID: "unknown-model", variants })
|
|
111 |
|
|
112 | // then
|
|
113 | console.info("S6 actual:", actual)
|
|
114 | expect(actual).toBe("default")
|
|
^
|
|
error: expect(received).toBe(expected)
|
|
|
|
Expected: "default"
|
|
Received: "__red__"
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:114:22)
|
|
(fail) resolveVariant > #given agent and fallback variants > #when no variant test matches #then returns fallback [0.07ms]
|
|
S7 actual: __red__
|
|
134 | }
|
|
135 | }
|
|
136 | console.info("S7 actual:", actual)
|
|
137 |
|
|
138 | // then
|
|
139 | expect(thrown).toBeInstanceOf(NoMatchingVariantError)
|
|
^
|
|
error: expect(received).toBeInstanceOf(expected)
|
|
|
|
Expected constructor: [class NoMatchingVariantError extends Error]
|
|
Received value: undefined
|
|
|
|
at <anonymous> (/Users/yeongyu/local-workspaces/omo-wt/feat/prompts-core-foundation/packages/prompts-core/src/variant-resolver.test.ts:139:22)
|
|
(fail) resolveVariant > #given agent and fallback variants > #when no variant matches and no fallback exists #then throws [0.09ms]
|
|
|
|
0 pass
|
|
7 fail
|
|
7 expect() calls
|
|
Ran 7 tests across 1 file. [74.00ms]
|