mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 09:30:58 -07:00
33 lines
828 B
TypeScript
33 lines
828 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { render } from '../../test-utils/render.js';
|
|
import { ThemedGradient } from './ThemedGradient.js';
|
|
import { describe, it, expect, vi } from 'vitest';
|
|
|
|
// Mock theme to control gradient
|
|
vi.mock('../semantic-colors.js', () => ({
|
|
theme: {
|
|
ui: {
|
|
gradient: ['red', 'blue'],
|
|
},
|
|
text: {
|
|
accent: 'cyan',
|
|
},
|
|
},
|
|
}));
|
|
|
|
describe('ThemedGradient', () => {
|
|
it('renders children', () => {
|
|
const { lastFrame } = render(<ThemedGradient>Hello</ThemedGradient>);
|
|
expect(lastFrame()).toContain('Hello');
|
|
});
|
|
|
|
// Note: Testing actual gradient application is hard with ink-testing-library
|
|
// as it often renders as plain text or ANSI codes.
|
|
// We mainly ensure it doesn't crash and renders content.
|
|
});
|