mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-04 06:04:03 +00:00
fix(shared): default non-finite string sample limits
This commit is contained in:
@@ -43,6 +43,15 @@ describe("summarizeStringEntries", () => {
|
||||
).toBe("a, b, c, d, e, f (+1)");
|
||||
});
|
||||
|
||||
it("uses the default limit for non-finite limits", () => {
|
||||
expect(
|
||||
summarizeStringEntries({
|
||||
entries: ["a", "b", "c", "d", "e", "f", "g"],
|
||||
limit: Number.NaN,
|
||||
}),
|
||||
).toBe("a, b, c, d, e, f (+1)");
|
||||
});
|
||||
|
||||
it("does not add a suffix when the limit exactly matches the entry count", () => {
|
||||
expect(
|
||||
summarizeStringEntries({
|
||||
|
||||
Reference in New Issue
Block a user