Implement term.getOption

This commit is contained in:
Paris Kasidiaris
2016-09-21 13:56:03 +03:00
parent be4c8341ba
commit 4b459fe0fd
2 changed files with 32 additions and 0 deletions
+16
View File
@@ -10,6 +10,22 @@ describe('xterm.js', function() {
xterm.refresh = function(){};
});
describe('getOption', function() {
it('should retrieve the option correctly', function() {
// In the `options` namespace.
xterm.options.cursorBlink = true;
assert.equal(xterm.getOption('cursorBlink'), true);
// On the Terminal instance
delete xterm.options.cursorBlink;
xterm.cursorBlink = false;
assert.equal(xterm.getOption('cursorBlink'), false);
});
it('should throw when retrieving a non-existant option', function() {
assert.throws(xterm.getOption.bind(xterm, 'fake', true));
});
});
describe('setOption', function() {
it('should set the option correctly', function() {
xterm.setOption('cursorBlink', true);