mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 03:24:42 -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 { WarningMessage } from './WarningMessage.js';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('WarningMessage', () => {
|
||||
it('renders with the correct prefix and text', () => {
|
||||
const { lastFrame } = render(<WarningMessage text="Watch out!" />);
|
||||
it('renders with the correct prefix and text', async () => {
|
||||
const { lastFrame, waitUntilReady, unmount } = render(
|
||||
<WarningMessage text="Watch out!" />,
|
||||
);
|
||||
await waitUntilReady();
|
||||
const output = lastFrame();
|
||||
|
||||
expect(output).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('renders multiline warning messages', () => {
|
||||
it('renders multiline warning messages', async () => {
|
||||
const message = 'Warning line 1\nWarning line 2';
|
||||
const { lastFrame } = render(<WarningMessage text={message} />);
|
||||
const { lastFrame, waitUntilReady, unmount } = render(
|
||||
<WarningMessage text={message} />,
|
||||
);
|
||||
await waitUntilReady();
|
||||
const output = lastFrame();
|
||||
|
||||
expect(output).toMatchSnapshot();
|
||||
unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user