Skip to content

Commit

Permalink
Test added due to code review
Browse files Browse the repository at this point in the history
  • Loading branch information
anijanyan committed Oct 28, 2022
1 parent 82466a2 commit af4eeca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/editor_commands_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ if (typeof process !== "undefined") {

"use strict";

var ace = require("./ace");
var EditSession = require("./edit_session").EditSession;
var Editor = require("./editor").Editor;
var UndoManager = require("./undomanager").UndoManager;
var MockRenderer = require("./test/mockrenderer").MockRenderer;
Expand Down Expand Up @@ -533,6 +531,16 @@ module.exports = {
exec("selectlineend", 1);
editor.execCommand(editor.commands.byName.joinlines);
assert.equal(editor.getValue(), "foo for foo foo foo for foo foo\nfoo for foo foo");
},
"test findlink": function() {
editor = new Editor(new MockRenderer());

editor.setValue("foo for foo foo\nhttps://www.google.com/", 1);
var url = editor.findLinkAt(0, 1);
assert.equal(url, null);

url = editor.findLinkAt(1, 5);
assert.equal(url, "https://www.google.com/");
}
};

Expand Down

0 comments on commit af4eeca

Please sign in to comment.