Skip to content

Commit 7d865cd

Browse files
committed
test: add uts for editor.getLine API
1 parent e253c53 commit 7d865cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/spec/Editor-test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,13 @@ define(function (require, exports, module) {
449449
});
450450
});
451451

452-
describe("getCursorPos", function () {
452+
describe("getCursorPos and getLine", function () {
453+
it("should getLine work correctly", function () {
454+
expect(myEditor.getLine(0)).toEqual("this is line 0");
455+
expect(myEditor.getLine(10000)).toEqual(null);
456+
expect(myEditor.getLine(-1)).toEqual(null);
457+
});
458+
453459
it("should return a single cursor", function () {
454460
myEditor._codeMirror.setCursor(0, 2);
455461
expect(myEditor.getCursorPos().line).toEqual(0);

0 commit comments

Comments
 (0)