Add more selection manager/model tests

This commit is contained in:
Daniel Imms
2017-06-07 14:37:09 -07:00
parent b81c165bea
commit a047359f81
3 changed files with 21 additions and 1 deletions
+11
View File
@@ -166,4 +166,15 @@ describe('SelectionManager', () => {
assert.equal(selectionManager.selectionText, '1\n2\n3\n4\n5');
});
});
describe('selectionText', () => {
it('should return the empty string when start or end selections are not set', () => {
assert.equal(selectionManager.selectionText, '');
selectionManager.model.selectionStart = [0, 0];
assert.equal(selectionManager.selectionText, '');
selectionManager.model.selectionStart = null;
selectionManager.model.selectionEnd = [0, 0];
assert.equal(selectionManager.selectionText, '');
});
});
});