test: clarify provider thinking level assertions · openclaw/openclaw@6a20bbd
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -117,7 +117,9 @@ describe("anthropic provider policy public artifact", () => {
|
117 | 117 | if (!profile) { |
118 | 118 | throw new Error("Expected Anthropic policy profile"); |
119 | 119 | } |
120 | | -expect(profile.levels.some((level) => level.id === "xhigh" || level.id === "max")).toBe(false); |
| 120 | +expect( |
| 121 | +profile.levels.map((level) => level.id).filter((id) => id === "xhigh" || id === "max"), |
| 122 | +).toEqual([]); |
121 | 123 | }); |
122 | 124 | |
123 | 125 | it("does not expose Anthropic thinking profiles for unrelated providers", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -24,6 +24,8 @@ describe("opencode provider policy public artifact", () => {
|
24 | 24 | levels: expect.arrayContaining([{ id: "adaptive" }]), |
25 | 25 | defaultLevel: "adaptive", |
26 | 26 | }); |
27 | | -expect(profile.levels.some((level) => level.id === "xhigh" || level.id === "max")).toBe(false); |
| 27 | +expect( |
| 28 | +profile.levels.map((level) => level.id).filter((id) => id === "xhigh" || id === "max"), |
| 29 | +).toEqual([]); |
28 | 30 | }); |
29 | 31 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,9 @@ describe("vercel ai gateway thinking profile", () => {
|
49 | 49 | levels: expect.arrayContaining([{ id: "adaptive" }]), |
50 | 50 | defaultLevel: "adaptive", |
51 | 51 | }); |
52 | | -expect(profile?.levels.some((level) => level.id === "xhigh" || level.id === "max")).toBe(false); |
| 52 | +expect( |
| 53 | +profile?.levels.map((level) => level.id).filter((id) => id === "xhigh" || id === "max"), |
| 54 | +).toEqual([]); |
53 | 55 | }); |
54 | 56 | |
55 | 57 | it("falls through for unsupported OpenAI or untrusted namespaced refs", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。