Files
oh-my-pi/packages/tui/test/text.test.ts
T
can1357 078dac7ea8 fix(tui): skipped loader render requests when text unchanged
- Returned a changed flag from setText to gate render requests.
- Avoided redundant renders when composed loader text matches prior frame.
2026-06-08 02:15:24 +02:00

13 lines
362 B
TypeScript

import { describe, expect, it } from "bun:test";
import { Text } from "@oh-my-pi/pi-tui/components/text";
describe("Text component", () => {
it("reports whether setText changed the stored text", () => {
const text = new Text("a");
expect(text.setText("a")).toBe(false);
expect(text.setText("b")).toBe(true);
expect(text.getText()).toBe("b");
});
});