File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ describe('Text Helpers', () => {
2323 content : 'doSomethingElse() {\n throw new Error(\'Nope!\');\n}' ,
2424 selection : new Selection ( 7 , 2 , 9 , 3 )
2525 } ;
26+ const testSelection3 : TestSelection = {
27+ content : '}\n\ndoSomethingElse() {' ,
28+ selection : new Selection ( 5 , 0 , 7 , 21 )
29+ } ;
2630 let document : TextDocument ;
2731
2832 before ( async ( ) => {
@@ -61,6 +65,12 @@ describe('Text Helpers', () => {
6165 ) ;
6266 } ) ;
6367
68+ it ( 'generates the correct text when selection contains empty line' , ( ) => {
69+ assert . deepEqual ( testSelection3 . content ,
70+ generateCopyableText ( document , testSelection3 . selection )
71+ ) ;
72+ } ) ;
73+
6474 context ( 'wrapTextInMarkdownCodeBlock' , ( ) => {
6575 it ( 'returns the text wrapped in a Markdown code block' , ( ) => {
6676 const codeSnippet = 'console.log("Yo");' ;
You can’t perform that action at this time.
0 commit comments