Fix tests
This commit is contained in:
+3
-1
@@ -14,7 +14,9 @@ describe('Buffer', () => {
|
|||||||
terminal = <any>{
|
terminal = <any>{
|
||||||
cols: 80,
|
cols: 80,
|
||||||
rows: 24,
|
rows: 24,
|
||||||
scrollback: 1000
|
options: {
|
||||||
|
scrollback: 1000
|
||||||
|
}
|
||||||
};
|
};
|
||||||
buffer = new Buffer(terminal);
|
buffer = new Buffer(terminal);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ describe('BufferSet', () => {
|
|||||||
terminal = <any>{
|
terminal = <any>{
|
||||||
cols: 80,
|
cols: 80,
|
||||||
rows: 24,
|
rows: 24,
|
||||||
scrollback: 1000
|
options: {
|
||||||
|
scrollback: 1000
|
||||||
|
}
|
||||||
};
|
};
|
||||||
bufferSet = new BufferSet(terminal);
|
bufferSet = new BufferSet(terminal);
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -779,7 +779,7 @@ export class Terminal extends EventEmitter implements ITerminal {
|
|||||||
* @param {string} addon The name of the addon to load
|
* @param {string} addon The name of the addon to load
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
public loadAddon(addon, callback) {
|
public static loadAddon(addon, callback) {
|
||||||
if (typeof exports === 'object' && typeof module === 'object') {
|
if (typeof exports === 'object' && typeof module === 'object') {
|
||||||
// CommonJS
|
// CommonJS
|
||||||
return require('./addons/' + addon + '/' + addon);
|
return require('./addons/' + addon + '/' + addon);
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ describe('Viewport', () => {
|
|||||||
height: 0
|
height: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollback: 10
|
options: {
|
||||||
|
scrollback: 10
|
||||||
|
}
|
||||||
};
|
};
|
||||||
terminal.buffers = new BufferSet(terminal);
|
terminal.buffers = new BufferSet(terminal);
|
||||||
terminal.buffer = terminal.buffers.active;
|
terminal.buffer = terminal.buffers.active;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ describe('xterm output comparison', function() {
|
|||||||
var xterm;
|
var xterm;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
xterm = new Terminal(COLS, ROWS);
|
xterm = new Terminal({ cols: COLS, rows: ROWS });
|
||||||
xterm.refresh = function() {};
|
xterm.refresh = function() {};
|
||||||
xterm.viewport = {
|
xterm.viewport = {
|
||||||
syncScrollArea: function() {}
|
syncScrollArea: function() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user