import "jest"; import { StringOrTBuilder } from "../StringOrTBuilder"; describe(StringOrTBuilder.name, () => { it("merges adjacent strings", () => { const builder = new StringOrTBuilder(); builder.push("hello"); builder.push(" "); builder.push("world"); expect(builder.items).toMatchObject(["hello world"]); }); it("does not merge strings across T boundaries", () => { const builder = new StringOrTBuilder(); builder.push("hello"); builder.push(null); builder.push("world"); expect(builder.items).toMatchObject(["hello", null, "world"]); }); });