Download packages/cli/src/ui/components/Banner.test.tsx from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/components/Banner.test.tsx
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/ui/components/Banner.test.tsx
-
curl -L -o Banner.test.tsx https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/components/Banner.test.tsx
1.1 kB
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { renderWithProviders } from '../../test-utils/render.js'; | |
| import { Banner } from './Banner.js'; | |
| import { describe, it, expect } from 'vitest'; | |
| describe('Banner', () => { | |
| it.each([ | |
| ['warning mode', true, 'Warning Message'], | |
| ['info mode', false, 'Info Message'], | |
| ['multi-line warning', true, 'Title Line\\nBody Line 1\\nBody Line 2'], | |
| ])('renders in %s', async (_, isWarning, text) => { | |
| const renderResult = await renderWithProviders( | |
| <Banner bannerText={text} isWarning={isWarning} width={80} />, | |
| ); | |
| await renderResult.waitUntilReady(); | |
| await expect(renderResult).toMatchSvgSnapshot(); | |
| renderResult.unmount(); | |
| }); | |
| it('handles newlines in text', async () => { | |
| const text = 'Line 1\\nLine 2'; | |
| const renderResult = await renderWithProviders( | |
| <Banner bannerText={text} isWarning={false} width={80} />, | |
| ); | |
| await renderResult.waitUntilReady(); | |
| await expect(renderResult).toMatchSvgSnapshot(); | |
| renderResult.unmount(); | |
| }); | |
| }); | |