mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 23:21:27 -07:00
27 lines
694 B
TypeScript
27 lines
694 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { Text } from 'ink';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { StickyHeader } from './StickyHeader.js';
|
|
import { renderWithProviders } from '../../test-utils/render.js';
|
|
|
|
describe('StickyHeader', () => {
|
|
it.each([true, false])('renders children with isFirst=%s', (isFirst) => {
|
|
const { lastFrame } = renderWithProviders(
|
|
<StickyHeader
|
|
isFirst={isFirst}
|
|
width={80}
|
|
borderColor="green"
|
|
borderDimColor={false}
|
|
>
|
|
<Text>Hello Sticky</Text>
|
|
</StickyHeader>,
|
|
);
|
|
expect(lastFrame()).toContain('Hello Sticky');
|
|
});
|
|
});
|