test: tighten provider empty payload assertions · openclaw/openclaw@9757a62
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ describe("Codex prompt overlay runtime contract", () => {
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | expect(contribution?.stablePrefix).toContain("<persona_latch>"); |
36 | | -expect(contribution?.sectionOverrides).toEqual({}); |
| 36 | +expect(contribution?.sectionOverrides).toStrictEqual({}); |
37 | 37 | }); |
38 | 38 | |
39 | 39 | it("does not add the shared GPT-5 overlay to non-GPT-5 Codex provider runs", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -56,7 +56,7 @@ describe("ollama provider policy public artifact", () => {
|
56 | 56 | provider: "openai", |
57 | 57 | providerConfig: {}, |
58 | 58 | }), |
59 | | -).toEqual({}); |
| 59 | +).toStrictEqual({}); |
60 | 60 | }); |
61 | 61 | |
62 | 62 | it("exposes max thinking for reasoning-capable models without full plugin activation", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -72,6 +72,6 @@ describe("resolveCodexAuthIdentity", () => {
|
72 | 72 | }); |
73 | 73 | |
74 | 74 | it("returns no metadata when token parsing yields no identity", () => { |
75 | | -expect(resolveCodexAuthIdentity({ accessToken: "not-a-jwt-token" })).toEqual({}); |
| 75 | +expect(resolveCodexAuthIdentity({ accessToken: "not-a-jwt-token" })).toStrictEqual({}); |
76 | 76 | }); |
77 | 77 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -268,7 +268,7 @@ describe("openrouter provider hooks", () => {
|
268 | 268 | } as never, |
269 | 269 | ); |
270 | 270 | |
271 | | -expect(capturedPayload).toEqual({}); |
| 271 | +expect(capturedPayload).toStrictEqual({}); |
272 | 272 | expect(baseStreamFn).toHaveBeenCalledOnce(); |
273 | 273 | }); |
274 | 274 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -57,8 +57,8 @@ describe("createQwenThinkingWrapper", () => {
|
57 | 57 | }); |
58 | 58 | |
59 | 59 | it("skips non-reasoning and non-completions models", () => { |
60 | | -expect(capturePayload({ model: { reasoning: false } })).toEqual({}); |
61 | | -expect(capturePayload({ model: { api: "openai-responses" as never } })).toEqual({}); |
| 60 | +expect(capturePayload({ model: { reasoning: false } })).toStrictEqual({}); |
| 61 | +expect(capturePayload({ model: { api: "openai-responses" as never } })).toStrictEqual({}); |
62 | 62 | }); |
63 | 63 | }); |
64 | 64 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -102,10 +102,12 @@ describe("createVllmQwenThinkingWrapper", () => {
|
102 | 102 | }); |
103 | 103 | |
104 | 104 | it("skips non-reasoning and non-completions models", () => { |
105 | | -expect(capturePayload({ format: "chat-template", model: { reasoning: false } })).toEqual({}); |
| 105 | +expect(capturePayload({ format: "chat-template", model: { reasoning: false } })).toStrictEqual( |
| 106 | +{}, |
| 107 | +); |
106 | 108 | expect( |
107 | 109 | capturePayload({ format: "chat-template", model: { api: "openai-responses" as never } }), |
108 | | -).toEqual({}); |
| 110 | +).toStrictEqual({}); |
109 | 111 | }); |
110 | 112 | }); |
111 | 113 | |
@@ -152,7 +154,7 @@ describe("createVllmProviderThinkingWrapper", () => {
|
152 | 154 | }); |
153 | 155 | |
154 | 156 | it("does not inject Nemotron 3 chat-template kwargs when thinking is enabled", () => { |
155 | | -expect(captureProviderPayload({ thinkingLevel: "low" })).toEqual({}); |
| 157 | +expect(captureProviderPayload({ thinkingLevel: "low" })).toStrictEqual({}); |
156 | 158 | }); |
157 | 159 | |
158 | 160 | it("preserves existing Nemotron 3 chat-template kwargs over defaults", () => { |
@@ -179,7 +181,7 @@ describe("createVllmProviderThinkingWrapper", () => {
|
179 | 181 | thinkingLevel: "off", |
180 | 182 | model: { id: "Qwen/Qwen3-8B" }, |
181 | 183 | }), |
182 | | -).toEqual({}); |
| 184 | +).toStrictEqual({}); |
183 | 185 | }); |
184 | 186 | }); |
185 | 187 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,8 +7,8 @@ import {
|
7 | 7 | |
8 | 8 | describe("xai tool config helpers", () => { |
9 | 9 | it("coerces non-record config to an empty object", () => { |
10 | | -expect(coerceXaiToolConfig(undefined)).toEqual({}); |
11 | | -expect(coerceXaiToolConfig([] as unknown as Record<string, unknown>)).toEqual({}); |
| 10 | +expect(coerceXaiToolConfig(undefined)).toStrictEqual({}); |
| 11 | +expect(coerceXaiToolConfig([] as unknown as Record<string, unknown>)).toStrictEqual({}); |
12 | 12 | }); |
13 | 13 | |
14 | 14 | it("normalizes configured model ids and falls back to the default model", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -153,7 +153,7 @@ describe("createAllowlistSetupWizardProxy", () => {
|
153 | 153 | |
154 | 154 | expect( |
155 | 155 | await promptSetupWizardAllowFrom({ promptAllowFrom: wizard.dmPolicy?.promptAllowFrom }), |
156 | | -).toEqual({}); |
| 156 | +).toStrictEqual({}); |
157 | 157 | expect( |
158 | 158 | await resolveSetupWizardAllowFromEntries({ |
159 | 159 | resolveEntries: wizard.allowFrom?.resolveEntries, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。