test(cli): add test with fixed sleep to check if Ink renders at all

This commit is contained in:
mkorwel
2026-04-16 17:28:16 +00:00
parent 4af34de21c
commit bf973df722
@@ -25,6 +25,14 @@ describe.sequential('render', () => {
unmount();
});
it('should render a component with fixed sleep', async () => {
vi.useRealTimers();
const { lastFrame, unmount } = await render(<Text>Hello World</Text>);
await new Promise((resolve) => setTimeout(resolve, 2000));
console.log(`[Test] lastFrame after sleep: ${JSON.stringify(lastFrame())}`);
unmount();
});
it('should support rerender', async () => {
const { lastFrame, rerender, waitUntilReady, unmount } = await render(
<Text>Hello</Text>,