test: spell out live probe values · openclaw/openclaw@bc7c5d9
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -34,15 +34,15 @@ describe("live model turn probes", () => {
|
34 | 34 | it("builds a text file read probe", () => { |
35 | 35 | const context = buildLiveModelFileProbeContext({ systemPrompt: "sys" }); |
36 | 36 | expect(context.systemPrompt).toBe("sys"); |
37 | | -expect(context.messages[0]?.content).toEqual( |
38 | | -expect.stringContaining(`LIVE_LABEL=${LIVE_MODEL_FILE_PROBE_TOKEN}`), |
| 37 | +expect(context.messages[0]?.content).toBe( |
| 38 | +"Read this visible label and reply with only the value after LIVE_LABEL.\n\nLIVE_LABEL=opal", |
39 | 39 | ); |
40 | 40 | }); |
41 | 41 | |
42 | 42 | it("builds a stricter file read retry probe", () => { |
43 | 43 | const context = buildLiveModelFileProbeRetryContext({}); |
44 | | -expect(context.messages[0]?.content).toEqual( |
45 | | -expect.stringContaining(`Reply with exactly ${LIVE_MODEL_FILE_PROBE_TOKEN}`), |
| 44 | +expect(context.messages[0]?.content).toBe( |
| 45 | +"The visible label value is:\n\nopal\n\nReply with exactly opal.", |
46 | 46 | ); |
47 | 47 | }); |
48 | 48 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,8 @@ describeLive("provider response headers (live)", () => {
|
49 | 49 | logLiveCache( |
50 | 50 | `openai headers x-request-id=${requestId ?? "(missing)"} openai-processing-ms=${processingMs ?? "(missing)"} ${rateLimitHeaders.join(" ")}`.trim(), |
51 | 51 | ); |
52 | | -expect(requestId).toEqual(expect.stringMatching(/\S/)); |
| 52 | +expect(typeof requestId).toBe("string"); |
| 53 | +expect(requestId?.trim()).not.toBe(""); |
53 | 54 | }, 120_000); |
54 | 55 | }); |
55 | 56 | |
@@ -87,7 +88,8 @@ describeLive("provider response headers (live)", () => {
|
87 | 88 | |
88 | 89 | const requestId = response.headers.get("request-id"); |
89 | 90 | logLiveCache(`anthropic headers request-id=${requestId ?? "(missing)"}`); |
90 | | -expect(requestId).toEqual(expect.stringMatching(/\S/)); |
| 91 | +expect(typeof requestId).toBe("string"); |
| 92 | +expect(requestId?.trim()).not.toBe(""); |
91 | 93 | }, 120_000); |
92 | 94 | }); |
93 | 95 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。