File: testing.md | Updated: 11/16/2025
Ink components are simple to test with ink-testing-library. Here's a simple example that checks how component is rendered:
import React from 'react';
import {Text} from 'ink';
import {render} from 'ink-testing-library';
const Test = () => <Text>Hello World</Text>;
const {lastFrame} = render(<Test />);
lastFrame() === 'Hello World'; //=> true
Check out ink-testing-library for more examples and full documentation.