Fix tests

This commit is contained in:
Daniel Imms
2017-01-04 08:08:59 -08:00
parent 2b8820fdac
commit 94c01ec378
2 changed files with 14 additions and 1 deletions
+5 -1
View File
@@ -92,7 +92,11 @@ describe('xterm output comparison', function() {
var from_pty = pty_write_read(in_file);
// uncomment this to get log from terminal
//console.log = function(){};
xterm.write(from_pty);
// Perform a synchronous .write(data)
xterm.writeBuffer.push(from_pty);
xterm.innerWrite();
var from_emulator = terminalToString(xterm);
console.log = CONSOLE_LOG;
var expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
+9
View File
@@ -14,6 +14,15 @@ describe('xterm.js', function() {
xterm.compositionHelper = {
keydown: function(){ return true; }
};
// Force synchronous refreshes
xterm.queueRefresh = function(start, end) {
xterm.refresh(start, end);
};
// Force synchronous writes
xterm.write = function(data) {
xterm.writeBuffer.push(data);
xterm.innerWrite();
};
});
describe('getOption', function() {