Add tests

This commit is contained in:
Daniel Imms
2018-07-26 12:23:34 -07:00
parent 48f1c4667a
commit 67d6ad57c3
4 changed files with 46 additions and 3 deletions
+5
View File
@@ -128,6 +128,11 @@ describe('SelectionManager', () => {
model.selectionEnd = [3, 2];
assert.deepEqual(model.finalSelectionEnd, [4, 2]);
});
it('should return the end on a different row when start + length overflows onto a following row', () => {
model.selectionStart = [78, 2];
model.selectionStartLength = 4;
assert.deepEqual(model.finalSelectionEnd, [2, 3]);
});
it('should return selection end if selection end is after selection start + length', () => {
model.selectionStart = [2, 2];
model.selectionStartLength = 2;