Files
vue-tui/packages/runtime-tests/integration/components/text.test.tsx
T
Yunfei He a7f7d9957d feat(runtime-tests): integration test suite
21 test files covering components, composables, focus, lifecycle,
and scheduler through the public render() API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:13:53 +08:00

21 lines
665 B
TypeScript

import { expect, test } from "vite-plus/test";
import { render } from "@vue-tui/testing";
import { Text } from "@vue-tui/runtime";
test("nested Text renders inline without independent layout", async () => {
const { lastFrame } = await render(() => (
<Text>
Hello <Text color="red">world</Text>
</Text>
));
const frame = lastFrame()!;
expect(frame).toContain("Hello");
expect(frame).toContain("world");
});
test("CJK wide characters render without corruption", async () => {
const { lastFrame } = await render(() => <Text>中文测试</Text>, { columns: 20 });
const frame = lastFrame()!;
expect(frame).toContain("中文测试");
});