diff --git a/lib/interfaces.ts b/lib/interfaces.ts index 5b2017d5..4c6fbe43 100644 --- a/lib/interfaces.ts +++ b/lib/interfaces.ts @@ -10,7 +10,7 @@ export interface ITerminalOptions { cursorBlink?: boolean; // Default: false cursorStyle?: 'block' | 'underline' | 'bar'; theme?: ITheme; - scrollback?: number; // Default: 1000 + scrollback?: number; // Default: 10000 fontSize?: number; // Default: 15 fontFamily?: string; // Default: 'monospace' allowTransparency?: boolean; diff --git a/lib/terminal.test.ts b/lib/terminal.test.ts index d56011ec..5cd44749 100644 --- a/lib/terminal.test.ts +++ b/lib/terminal.test.ts @@ -2332,6 +2332,18 @@ describe('Public Mutable Options', () => { expect(term.options.scrollback).toBe(5000); }); + test('options expose default values when none are provided', async () => { + const term = await createIsolatedTerminal(); + try { + expect(term.options).toBeDefined(); + expect(term.options.cols).toBe(80); + expect(term.options.rows).toBe(24); + expect(term.options.scrollback).toBe(10000); + } finally { + term.dispose(); + } + }); + test('options can be mutated at runtime', async () => { const term = await createIsolatedTerminal(); expect(term.options.disableStdin).toBe(false);