[refactor] Use better way to select a single line

pull/3141/head
Luiza Pagliari 2017-02-20 06:03:56 -03:00
parent 92be656113
commit 15cda0fde6
1 changed files with 11 additions and 11 deletions

View File

@ -115,7 +115,7 @@ describe("the test helper", function(){
// wait for lines to be split // wait for lines to be split
helper.waitFor(function(){ helper.waitFor(function(){
var $fourthLine = helper.padInner$("div").slice(3,4); var $fourthLine = helper.padInner$("div").eq(3);
return $fourthLine.text() === "to test"; return $fourthLine.text() === "to test";
}).done(done); }).done(done);
}); });
@ -130,8 +130,8 @@ describe("the test helper", function(){
var endOffset = 4; var endOffset = 4;
var $lines = inner$("div"); var $lines = inner$("div");
var $startLine = $lines.slice(1,2); var $startLine = $lines.eq(1);
var $endLine = $lines.slice(3,4); var $endLine = $lines.eq(3);
helper.selectLines($startLine, $endLine, startOffset, endOffset); helper.selectLines($startLine, $endLine, startOffset, endOffset);
@ -148,8 +148,8 @@ describe("the test helper", function(){
var endOffset = 1; var endOffset = 1;
var $lines = inner$("div"); var $lines = inner$("div");
var $startLine = $lines.slice(1,2); var $startLine = $lines.eq(1);
var $endLine = $lines.slice(4,5); var $endLine = $lines.eq(4);
helper.selectLines($startLine, $endLine, startOffset, endOffset); helper.selectLines($startLine, $endLine, startOffset, endOffset);
@ -166,8 +166,8 @@ describe("the test helper", function(){
var endOffset = 0; var endOffset = 0;
var $lines = inner$("div"); var $lines = inner$("div");
var $startLine = $lines.slice(1,2); var $startLine = $lines.eq(1);
var $endLine = $lines.slice(3,4); var $endLine = $lines.eq(3);
helper.selectLines($startLine, $endLine, startOffset, endOffset); helper.selectLines($startLine, $endLine, startOffset, endOffset);
@ -184,8 +184,8 @@ describe("the test helper", function(){
var endOffset = 50; var endOffset = 50;
var $lines = inner$("div"); var $lines = inner$("div");
var $startLine = $lines.slice(1,2); var $startLine = $lines.eq(1);
var $endLine = $lines.slice(3,4); var $endLine = $lines.eq(3);
helper.selectLines($startLine, $endLine, startOffset, endOffset); helper.selectLines($startLine, $endLine, startOffset, endOffset);
@ -199,8 +199,8 @@ describe("the test helper", function(){
var inner$ = helper.padInner$; var inner$ = helper.padInner$;
var $lines = inner$("div"); var $lines = inner$("div");
var $startLine = $lines.slice(1,2); var $startLine = $lines.eq(1);
var $endLine = $lines.slice(3,4); var $endLine = $lines.eq(3);
helper.selectLines($startLine, $endLine); helper.selectLines($startLine, $endLine);