4 import { assert } from 'chai';
5 import { ITerminal } from './Interfaces';
6 import { Buffer } from './Buffer';
7 import { CircularList } from './utils/CircularList';
9 describe('Buffer', () => {
10 let terminal: ITerminal;
19 buffer = new Buffer(terminal);
22 describe('constructor', () => {
23 it('should create a CircularList with max length equal to scrollback, for its lines', () => {
24 assert.instanceOf(buffer.lines, CircularList);
25 assert.equal(buffer.lines.maxLength, terminal.scrollback);
27 it('should set the Buffer\'s scrollBottom value equal to the terminal\'s rows -1', () => {
28 assert.equal(buffer.scrollBottom, terminal.rows - 1);