]> git.proxmox.com Git - mirror_xterm.js.git/blame - src/Buffer.test.ts
higher timeout for test case
[mirror_xterm.js.git] / src / Buffer.test.ts
CommitLineData
cb5a452c
PK
1/**
2 * @license MIT
3 */
4import { assert } from 'chai';
5import { ITerminal } from './Interfaces';
6import { Buffer } from './Buffer';
7import { CircularList } from './utils/CircularList';
8
9describe('Buffer', () => {
10 let terminal: ITerminal;
11 let buffer: Buffer;
12
13 beforeEach(() => {
14 terminal = <any>{
15 cols: 80,
16 rows: 24,
17 scrollback: 1000
18 };
19 buffer = new Buffer(terminal);
20 });
21
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);
26 });
27 it('should set the Buffer\'s scrollBottom value equal to the terminal\'s rows -1', () => {
28 assert.equal(buffer.scrollBottom, terminal.rows - 1);
29 });
30 });
31});