* 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>
23 lines
632 B
TypeScript
23 lines
632 B
TypeScript
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);
|
|
});
|
|
});
|