@@ -3,7 +3,7 @@ import Mocha, { describe, it } from 'mocha';
33import { expect } from 'chai' ;
44import {
55 openDocument ,
6- zeroBasedLine ,
6+ naturalEditorLine ,
77 NaturalEditorPosition ,
88 expectActiveTextEditorWithFile ,
99 documentLinesChanged ,
@@ -50,17 +50,17 @@ export default (): void => {
5050 const textDocument = activeTextEditor . document ;
5151 expect (
5252 / \{ \s * $ / . test (
53- textDocument . lineAt ( zeroBasedLine ( { visualLine : 3 } ) ) . text ,
53+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 3 } ) ) . text ,
5454 ) ,
5555 ) . to . equal ( true ) ;
5656 expect (
5757 / c o n s o l e \. l o g \( .* / . test (
58- textDocument . lineAt ( zeroBasedLine ( { visualLine : 4 } ) ) . text ,
58+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 4 } ) ) . text ,
5959 ) ,
6060 ) . to . equal ( true ) ;
6161 expect (
6262 / r e t u r n / . test (
63- textDocument . lineAt ( zeroBasedLine ( { visualLine : 5 } ) ) . text ,
63+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 5 } ) ) . text ,
6464 ) ,
6565 ) . to . equal ( true ) ;
6666 }
@@ -88,22 +88,22 @@ export default (): void => {
8888 const textDocument = activeTextEditor . document ;
8989 expect (
9090 / \{ \s * $ / . test (
91- textDocument . lineAt ( zeroBasedLine ( { visualLine : 5 } ) ) . text ,
91+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 5 } ) ) . text ,
9292 ) ,
9393 ) . to . equal ( true ) ;
9494 expect (
9595 / c o n s o l e \. l o g \( .* / . test (
96- textDocument . lineAt ( zeroBasedLine ( { visualLine : 6 } ) ) . text ,
96+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 6 } ) ) . text ,
9797 ) ,
9898 ) . to . equal ( true ) ;
9999 expect (
100100 / r e t u r n m e m b e r .i n c l u d e \( ' S ' \) / . test (
101- textDocument . lineAt ( zeroBasedLine ( { visualLine : 7 } ) ) . text ,
101+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 7 } ) ) . text ,
102102 ) ,
103103 ) . to . equal ( true ) ;
104104 expect (
105105 / } \) / . test (
106- textDocument . lineAt ( zeroBasedLine ( { visualLine : 8 } ) ) . text ,
106+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 8 } ) ) . text ,
107107 ) ,
108108 ) . to . equal ( true ) ;
109109 }
@@ -131,22 +131,22 @@ export default (): void => {
131131 const textDocument = activeTextEditor . document ;
132132 expect (
133133 / \{ \s * $ / . test (
134- textDocument . lineAt ( zeroBasedLine ( { visualLine : 8 } ) ) . text ,
134+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 8 } ) ) . text ,
135135 ) ,
136136 ) . to . equal ( true ) ;
137137 expect (
138138 / c o n s o l e \. l o g \( .* / . test (
139- textDocument . lineAt ( zeroBasedLine ( { visualLine : 9 } ) ) . text ,
139+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 9 } ) ) . text ,
140140 ) ,
141141 ) . to . equal ( true ) ;
142142 expect (
143143 / r e t u r n i t e m .i n d e x ! = = o r i g i n a l .i n d e x / . test (
144- textDocument . lineAt ( zeroBasedLine ( { visualLine : 10 } ) ) . text ,
144+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 10 } ) ) . text ,
145145 ) ,
146146 ) . to . equal ( true ) ;
147147 expect (
148148 / } \) / . test (
149- textDocument . lineAt ( zeroBasedLine ( { visualLine : 11 } ) ) . text ,
149+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 11 } ) ) . text ,
150150 ) ,
151151 ) . to . equal ( true ) ;
152152 }
@@ -177,22 +177,22 @@ export default (): void => {
177177 const textDocument = activeTextEditor . document ;
178178 expect (
179179 / \{ \s * $ / . test (
180- textDocument . lineAt ( zeroBasedLine ( { visualLine : 12 } ) ) . text ,
180+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 12 } ) ) . text ,
181181 ) ,
182182 ) . to . equal ( true ) ;
183183 expect (
184184 / c o n s o l e \. l o g \( .* / . test (
185- textDocument . lineAt ( zeroBasedLine ( { visualLine : 13 } ) ) . text ,
185+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 13 } ) ) . text ,
186186 ) ,
187187 ) . to . equal ( true ) ;
188188 expect (
189189 / r e t u r n c h e c k A c c o u n t i n g P e r i o d D i v i d e \( b u d g e t ._ i d , a c c o u n t i n g P e r i o d I d \) / . test (
190- textDocument . lineAt ( zeroBasedLine ( { visualLine : 14 } ) ) . text ,
190+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 14 } ) ) . text ,
191191 ) ,
192192 ) . to . equal ( true ) ;
193193 expect (
194194 / } \) / . test (
195- textDocument . lineAt ( zeroBasedLine ( { visualLine : 15 } ) ) . text ,
195+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 15 } ) ) . text ,
196196 ) ,
197197 ) . to . equal ( true ) ;
198198 }
@@ -220,22 +220,22 @@ export default (): void => {
220220 const textDocument = activeTextEditor . document ;
221221 expect (
222222 / \{ \s * $ / . test (
223- textDocument . lineAt ( zeroBasedLine ( { visualLine : 19 } ) ) . text ,
223+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 19 } ) ) . text ,
224224 ) ,
225225 ) . to . equal ( true ) ;
226226 expect (
227227 / c o n s o l e \. l o g \( .* / . test (
228- textDocument . lineAt ( zeroBasedLine ( { visualLine : 20 } ) ) . text ,
228+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 20 } ) ) . text ,
229229 ) ,
230230 ) . to . equal ( true ) ;
231231 expect (
232232 / r e t u r n c h e c k A c c o u n t i n g P e r i o d D i v i d e \( b u d g e t ._ i d \) / . test (
233- textDocument . lineAt ( zeroBasedLine ( { visualLine : 21 } ) ) . text ,
233+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 21 } ) ) . text ,
234234 ) ,
235235 ) . to . equal ( true ) ;
236236 expect (
237237 / } \) / . test (
238- textDocument . lineAt ( zeroBasedLine ( { visualLine : 23 } ) ) . text ,
238+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 23 } ) ) . text ,
239239 ) ,
240240 ) . to . equal ( true ) ;
241241 }
@@ -263,22 +263,22 @@ export default (): void => {
263263 const textDocument = activeTextEditor . document ;
264264 expect (
265265 / \{ \s * $ / . test (
266- textDocument . lineAt ( zeroBasedLine ( { visualLine : 27 } ) ) . text ,
266+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 27 } ) ) . text ,
267267 ) ,
268268 ) . to . equal ( true ) ;
269269 expect (
270270 / c o n s o l e \. l o g \( .* / . test (
271- textDocument . lineAt ( zeroBasedLine ( { visualLine : 28 } ) ) . text ,
271+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 28 } ) ) . text ,
272272 ) ,
273273 ) . to . equal ( true ) ;
274274 expect (
275275 / r e t u r n c h e c k A c c o u n t i n g P e r i o d D i v i d e \( b u d g e t ._ i d , a c c o u n t i n g P e r i o d I d \) / . test (
276- textDocument . lineAt ( zeroBasedLine ( { visualLine : 29 } ) ) . text ,
276+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 29 } ) ) . text ,
277277 ) ,
278278 ) . to . equal ( true ) ;
279279 expect (
280280 / } \) / . test (
281- textDocument . lineAt ( zeroBasedLine ( { visualLine : 30 } ) ) . text ,
281+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 30 } ) ) . text ,
282282 ) ,
283283 ) . to . equal ( true ) ;
284284 }
@@ -306,22 +306,22 @@ export default (): void => {
306306 const textDocument = activeTextEditor . document ;
307307 expect (
308308 / \{ \s * $ / . test (
309- textDocument . lineAt ( zeroBasedLine ( { visualLine : 35 } ) ) . text ,
309+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 35 } ) ) . text ,
310310 ) ,
311311 ) . to . equal ( true ) ;
312312 expect (
313313 / c o n s o l e \. l o g \( .* / . test (
314- textDocument . lineAt ( zeroBasedLine ( { visualLine : 36 } ) ) . text ,
314+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 36 } ) ) . text ,
315315 ) ,
316316 ) . to . equal ( true ) ;
317317 expect (
318318 / r e t u r n c h e c k A c c o u n t i n g P e r i o d D i v i d e \( b u d g e t ._ i d \) / . test (
319- textDocument . lineAt ( zeroBasedLine ( { visualLine : 37 } ) ) . text ,
319+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 37 } ) ) . text ,
320320 ) ,
321321 ) . to . equal ( true ) ;
322322 expect (
323323 / } \) / . test (
324- textDocument . lineAt ( zeroBasedLine ( { visualLine : 39 } ) ) . text ,
324+ textDocument . lineAt ( naturalEditorLine ( { visualLine : 39 } ) ) . text ,
325325 ) ,
326326 ) . to . equal ( true ) ;
327327 }
0 commit comments