test: tighten auto reply timestamps · openclaw/openclaw@048a50c
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -315,6 +315,7 @@ describe("handleTtsCommands status fallback reporting", () => {
|
315 | 315 | const sessionEntry: SessionEntry = { sessionId: "s1", updatedAt: 1, sessionFile }; |
316 | 316 | const sessionStore = { "session-key": sessionEntry }; |
317 | 317 | |
| 318 | +const beforeTtsRead = Date.now(); |
318 | 319 | const result = await handleTtsCommands( |
319 | 320 | buildTtsParams("/tts latest", {}, undefined, { sessionEntry, sessionStore }), |
320 | 321 | true, |
@@ -330,7 +331,7 @@ describe("handleTtsCommands status fallback reporting", () => {
|
330 | 331 | expect.objectContaining({ text: "latest visible reply" }), |
331 | 332 | ); |
332 | 333 | expect(sessionEntry.lastTtsReadLatestHash).toMatch(/^[a-f0-9]{64}$/); |
333 | | -expect(sessionEntry.lastTtsReadLatestAt).toEqual(expect.any(Number)); |
| 334 | +expect(sessionEntry.lastTtsReadLatestAt).toBeGreaterThanOrEqual(beforeTtsRead); |
334 | 335 | }); |
335 | 336 | |
336 | 337 | it("does not resend /tts latest for the same assistant reply", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。