惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
The Cloudflare Blog
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
T
The Blog of Author Tim Ferriss
D
Docker
L
LangChain Blog
Vercel News
Vercel News
C
Check Point Blog
博客园 - Franky
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
人人都是产品经理
人人都是产品经理

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten line send receipt assertions · openclaw/ope...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -93,6 +93,8 @@ const LINE_TEST_CFG = {

9393

};

94949595

describe("LINE send helpers", () => {

96+

const fixedSentAt = 1_800_000_000_000;

97+9698

beforeAll(async () => {

9799

sendModule = await import("./send.js");

98100

});

@@ -109,6 +111,7 @@ describe("LINE send helpers", () => {

109111

});

110112111113

beforeEach(() => {

114+

vi.setSystemTime(fixedSentAt);

112115

pushMessageMock.mockReset();

113116

replyMessageMock.mockReset();

114117

showLoadingAnimationMock.mockReset();

@@ -176,8 +179,40 @@ describe("LINE send helpers", () => {

176179

direction: "outbound",

177180

});

178181

expect(logVerboseMock).toHaveBeenCalledWith("line: pushed image to U123");

179-

expect(result).toMatchObject({ messageId: "push", chatId: "U123" });

180-

expect(result.receipt.primaryPlatformMessageId).toBe("push");

182+

expect(result).toEqual({

183+

chatId: "U123",

184+

messageId: "push",

185+

receipt: {

186+

parts: [

187+

{

188+

index: 0,

189+

kind: "media",

190+

platformMessageId: "push",

191+

raw: {

192+

channel: "line",

193+

chatId: "U123",

194+

conversationId: "U123",

195+

messageId: "push",

196+

meta: { messageCount: 1 },

197+

},

198+

threadId: "U123",

199+

},

200+

],

201+

platformMessageIds: ["push"],

202+

primaryPlatformMessageId: "push",

203+

raw: [

204+

{

205+

channel: "line",

206+

chatId: "U123",

207+

conversationId: "U123",

208+

messageId: "push",

209+

meta: { messageCount: 1 },

210+

},

211+

],

212+

sentAt: fixedSentAt,

213+

threadId: "U123",

214+

},

215+

});

181216

});

182217183218

it("replies when reply token is provided", async () => {

@@ -205,10 +240,40 @@ describe("LINE send helpers", () => {

205240

],

206241

});

207242

expect(logVerboseMock).toHaveBeenCalledWith("line: replied to C1");

208-

expect(result).toMatchObject({ messageId: "reply", chatId: "C1" });

209-

expect(result.receipt.primaryPlatformMessageId).toBe("reply");

210-

expect(result.receipt.threadId).toBe("C1");

211-

expect(result.receipt.parts[0]?.kind).toBe("media");

243+

expect(result).toEqual({

244+

chatId: "C1",

245+

messageId: "reply",

246+

receipt: {

247+

parts: [

248+

{

249+

index: 0,

250+

kind: "media",

251+

platformMessageId: "reply",

252+

raw: {

253+

channel: "line",

254+

chatId: "C1",

255+

conversationId: "C1",

256+

messageId: "reply",

257+

meta: { messageCount: 2 },

258+

},

259+

threadId: "C1",

260+

},

261+

],

262+

platformMessageIds: ["reply"],

263+

primaryPlatformMessageId: "reply",

264+

raw: [

265+

{

266+

channel: "line",

267+

chatId: "C1",

268+

conversationId: "C1",

269+

messageId: "reply",

270+

meta: { messageCount: 2 },

271+

},

272+

],

273+

sentAt: fixedSentAt,

274+

threadId: "C1",

275+

},

276+

});

212277

});

213278214279

it("sends video with explicit image preview URL", async () => {