mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 12:57:12 -07:00
a00fb01f89
Co-authored-by: Jacob Richman <jacob314@gmail.com>
30 lines
783 B
TypeScript
30 lines
783 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { describe, it, expect } from 'vitest';
|
|
import { calculateMainAreaWidth } from './ui-sizing.js';
|
|
import type { Config } from '@google/gemini-cli-core';
|
|
|
|
describe('ui-sizing', () => {
|
|
describe('calculateMainAreaWidth', () => {
|
|
it.each([
|
|
// expected, width, altBuffer
|
|
[80, 80, false],
|
|
[100, 100, false],
|
|
[79, 80, true],
|
|
[99, 100, true],
|
|
])(
|
|
'should return %i when width=%i and altBuffer=%s',
|
|
(expected, width, altBuffer) => {
|
|
const mockConfig = {
|
|
getUseAlternateBuffer: () => altBuffer,
|
|
} as unknown as Config;
|
|
expect(calculateMainAreaWidth(width, mockConfig)).toBe(expected);
|
|
},
|
|
);
|
|
});
|
|
});
|