mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 11:25:50 -06:00
3f9b4519a9
* fix: normalize fractional text chunk limits * fix: normalize markdown chunk limits * fix: normalize direct newline chunk limits * fix(matrix): reuse progress-safe text chunker * test(matrix): align runtime API guard * test(matrix): keep outbound shard topology stable * fix(matrix): preserve facade chunk compatibility * test(matrix): keep runtime export guard stable * fix(matrix): normalize render-aware chunk limits * test(matrix): type real-send assertions * fix(matrix): preserve one-unit event limits --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
11 lines
402 B
TypeScript
11 lines
402 B
TypeScript
// Markdown Core tests cover plain-text chunking behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import { chunkText } from "./chunk-text.js";
|
|
|
|
describe("chunkText", () => {
|
|
it("normalizes positive fractional limits without emitting empty chunks", () => {
|
|
expect(chunkText("abc", 0.5)).toEqual(["a", "b", "c"]);
|
|
expect(chunkText("😀😀", 0.5)).toEqual(["😀", "😀"]);
|
|
});
|
|
});
|