mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-19 17:50:37 -07:00
Migrate core render util to use xterm.js as part of the rendering loop. (#19044)
This commit is contained in:
@@ -9,18 +9,26 @@ import { ErrorMessage } from './ErrorMessage.js';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('ErrorMessage', () => {
|
||||
it('renders with the correct prefix and text', () => {
|
||||
const { lastFrame } = render(<ErrorMessage text="Something went wrong" />);
|
||||
it('renders with the correct prefix and text', async () => {
|
||||
const { lastFrame, waitUntilReady, unmount } = render(
|
||||
<ErrorMessage text="Something went wrong" />,
|
||||
);
|
||||
await waitUntilReady();
|
||||
const output = lastFrame();
|
||||
|
||||
expect(output).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('renders multiline error messages', () => {
|
||||
it('renders multiline error messages', async () => {
|
||||
const message = 'Error line 1\nError line 2';
|
||||
const { lastFrame } = render(<ErrorMessage text={message} />);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(
|
||||
<ErrorMessage text={message} />,
|
||||
);
|
||||
await waitUntilReady();
|
||||
const output = lastFrame();
|
||||
|
||||
expect(output).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user