mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 15:44:31 +00:00
feat: Add Line plugin (#1630)
* feat: add LINE plugin (#1630) (thanks @plum-dawg) * feat: complete LINE plugin (#1630) (thanks @plum-dawg) * chore: drop line plugin node_modules (#1630) (thanks @plum-dawg) * test: mock /context report in commands test (#1630) (thanks @plum-dawg) * test: limit macOS CI workers to avoid OOM (#1630) (thanks @plum-dawg) * test: reduce macOS CI vitest workers (#1630) (thanks @plum-dawg) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
22
src/auto-reply/reply/normalize-reply.test.ts
Normal file
22
src/auto-reply/reply/normalize-reply.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { normalizeReplyPayload } from "./normalize-reply.js";
|
||||
|
||||
// Keep channelData-only payloads so channel-specific replies survive normalization.
|
||||
describe("normalizeReplyPayload", () => {
|
||||
it("keeps channelData-only replies", () => {
|
||||
const payload = {
|
||||
channelData: {
|
||||
line: {
|
||||
flexMessage: { type: "bubble" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const normalized = normalizeReplyPayload(payload);
|
||||
|
||||
expect(normalized).not.toBeNull();
|
||||
expect(normalized?.text).toBeUndefined();
|
||||
expect(normalized?.channelData).toEqual(payload.channelData);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user