Type InputHandler._terminal

This commit is contained in:
Daniel Imms
2017-08-05 12:57:29 -07:00
parent 8a0bcf6b79
commit aee474b53e
7 changed files with 139 additions and 70 deletions
+3 -2
View File
@@ -5,7 +5,8 @@ import { wcwidth } from './InputHandler';
describe('InputHandler', () => {
describe('save and restore cursor', () => {
let terminal = { buffer: { x: 1, y: 2 } };
let inputHandler = new InputHandler(terminal);
// TODO: Create proper mock IInputHandlingTerminal test util object
let inputHandler = new InputHandler(<any>terminal);
// Save cursor position
inputHandler.saveCursor([]);
assert.equal(terminal.buffer.x, 1);
@@ -24,7 +25,7 @@ describe('InputHandler', () => {
let terminal = {
setOption: (option, value) => options[option] = value
};
let inputHandler = new InputHandler(terminal);
let inputHandler = new InputHandler(<any>terminal);
inputHandler.setCursorStyle([0]);
assert.equal(options['cursorStyle'], 'block');