@@ -22,17 +22,15 @@ suite("TableRangePrettyfier tests", () => {
2222 } ) ;
2323
2424 test ( "provideDocumentRangeFormattingEdits() table factory called with invalid table then logInfo() called" , ( ) => {
25- const tableText = `
26- hello | world
27- -|-
28- new | line
29- ` ;
25+ const tableText = `hello | world
26+ -|-
27+ new | line` ;
3028 const mockTableFactory : typeMock . IMock < ITableFactory > = typeMock . Mock . ofType < ITableFactory > ( ) ;
3129 const mockLogger : typeMock . IMock < ILogger > = typeMock . Mock . ofType < ILogger > ( ) ;
3230 const trp = new TableRangePrettyfier ( mockTableFactory . object , mockLogger . object ) ;
3331
3432 const textDoc = new MockMarkdownTextDocument ( tableText ) ;
35- const range = textDoc . getRangeForLines ( 1 , 4 ) ;
33+ const range = textDoc . getRangeForLines ( 1 , 3 ) ;
3634 mockTableFactory
3735 . setup ( t => t . create ( textDoc . getText ( range ) ) )
3836 . returns ( ( ) => null )
@@ -48,18 +46,16 @@ new | line
4846 } ) ;
4947
5048 test ( "provideDocumentRangeFormattingEdits() table prettyPrint() called and logInfo() not called" , ( ) => {
51- const tableText = `
52- hello | world
53- -|-
54- new | line
55- ` ;
49+ const tableText = `hello | world
50+ -|-
51+ new | line` ;
5652 const mockTableFactory : typeMock . IMock < ITableFactory > = typeMock . Mock . ofType < ITableFactory > ( ) ;
5753 const mockLogger : typeMock . IMock < ILogger > = typeMock . Mock . ofType < ILogger > ( ) ;
5854 const mockTable : typeMock . IMock < ITable > = typeMock . Mock . ofType < ITable > ( ) ;
5955 const trp = new TableRangePrettyfier ( mockTableFactory . object , mockLogger . object ) ;
6056
6157 const textDoc = new MockMarkdownTextDocument ( tableText ) ;
62- const range = textDoc . getRangeForLines ( 1 , 4 ) ;
58+ const range = textDoc . getRangeForLines ( 1 , 3 ) ;
6359
6460 mockTable
6561 . setup ( t => t . prettyPrint ( ) )
@@ -80,18 +76,16 @@ new | line
8076 } ) ;
8177
8278 test ( "provideDocumentRangeFormattingEdits() the result of the prettyPrint() is returned" , ( ) => {
83- const tableText = `
84- hello | world
85- -|-
86- new | line
87- ` ;
79+ const tableText = `hello | world
80+ -|-
81+ new | line` ;
8882 const mockTableFactory : typeMock . IMock < ITableFactory > = typeMock . Mock . ofType < ITableFactory > ( ) ;
8983 const mockLogger : typeMock . IMock < ILogger > = typeMock . Mock . ofType < ILogger > ( ) ;
9084 const mockTable : typeMock . IMock < ITable > = typeMock . Mock . ofType < ITable > ( ) ;
9185 const trp = new TableRangePrettyfier ( mockTableFactory . object , mockLogger . object ) ;
9286
9387 const textDoc = new MockMarkdownTextDocument ( tableText ) ;
94- const range = textDoc . getRangeForLines ( 1 , 4 ) ;
88+ const range = textDoc . getRangeForLines ( 1 , 3 ) ;
9589
9690 mockTable
9791 . setup ( t => t . prettyPrint ( ) )
0 commit comments