mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-16 19:31:35 +00:00
16 lines
481 B
TypeScript
16 lines
481 B
TypeScript
// Markdown Core tests cover ir.chunking behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import { chunkMarkdownIR, type MarkdownIR } from "./ir.js";
|
|
|
|
describe("chunkMarkdownIR", () => {
|
|
it("keeps the final in-limit remainder together after a soft break", () => {
|
|
const ir: MarkdownIR = {
|
|
text: "abcdefgh ij kl",
|
|
styles: [],
|
|
links: [],
|
|
};
|
|
|
|
expect(chunkMarkdownIR(ir, 10).map((chunk) => chunk.text)).toEqual(["abcdefgh", "ij kl"]);
|
|
});
|
|
});
|