Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
import { describe, expect, it } from "vite-plus/test";
import { truncate } from "./String.ts";
describe("truncate", () => {
it("trims surrounding whitespace", () => {
expect(truncate(" hello world ")).toBe("hello world");
});
it("returns shorter strings unchanged", () => {
expect(truncate("alpha", 10)).toBe("alpha");
});
it("truncates long strings and appends an ellipsis", () => {
expect(truncate("abcdefghij", 5)).toBe("abcde...");
});
});