Fix tests

This commit is contained in:
Daniel Imms
2017-08-05 02:34:21 -07:00
parent 8903bddb17
commit 7d1c5d1ac6
5 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -14,7 +14,9 @@ describe('Buffer', () => {
terminal = <any>{
cols: 80,
rows: 24,
scrollback: 1000
options: {
scrollback: 1000
}
};
buffer = new Buffer(terminal);
});
+3 -1
View File
@@ -14,7 +14,9 @@ describe('BufferSet', () => {
terminal = <any>{
cols: 80,
rows: 24,
scrollback: 1000
options: {
scrollback: 1000
}
};
bufferSet = new BufferSet(terminal);
});
+1 -1
View File
@@ -779,7 +779,7 @@ export class Terminal extends EventEmitter implements ITerminal {
* @param {string} addon The name of the addon to load
* @static
*/
public loadAddon(addon, callback) {
public static loadAddon(addon, callback) {
if (typeof exports === 'object' && typeof module === 'object') {
// CommonJS
return require('./addons/' + addon + '/' + addon);
+3 -1
View File
@@ -26,7 +26,9 @@ describe('Viewport', () => {
height: 0
}
},
scrollback: 10
options: {
scrollback: 10
}
};
terminal.buffers = new BufferSet(terminal);
terminal.buffer = terminal.buffers.active;
+1 -1
View File
@@ -80,7 +80,7 @@ describe('xterm output comparison', function() {
var xterm;
beforeEach(function () {
xterm = new Terminal(COLS, ROWS);
xterm = new Terminal({ cols: COLS, rows: ROWS });
xterm.refresh = function() {};
xterm.viewport = {
syncScrollArea: function() {}