File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -664,9 +664,6 @@ namespace ts {
664
664
let collecting = trailing ;
665
665
let accumulator = initial ;
666
666
if ( pos === 0 ) {
667
- if ( collecting ) {
668
- return accumulator ;
669
- }
670
667
collecting = true ;
671
668
const shebang = getShebang ( text ) ;
672
669
if ( shebang ) {
Original file line number Diff line number Diff line change @@ -28,22 +28,5 @@ namespace ts {
28
28
assert . strictEqual ( result ! . length , 1 ) ;
29
29
assert . strictEqual ( result ! [ 0 ] . kind , SyntaxKind . SingleLineCommentTrivia ) ;
30
30
} ) ;
31
-
32
- it ( "returns no trailing comments at start of file" , ( ) => {
33
- const result = getTrailingCommentRanges ( noShebang , 0 ) ;
34
- assert . isUndefined ( result ) ;
35
- } ) ;
36
-
37
- it ( "returns no trailing comments at start of file if shebang is present" , ( ) => {
38
- const result = getTrailingCommentRanges ( withShebang , 0 ) ;
39
- assert . isUndefined ( result ) ;
40
- } ) ;
41
-
42
- it ( "returns trailing comments if position is not 0" , ( ) => {
43
- const result = getTrailingCommentRanges ( withTrailing , 1 ) ;
44
- assert . isDefined ( result ) ;
45
- assert . strictEqual ( result ! . length , 1 ) ;
46
- assert . strictEqual ( result ! [ 0 ] . kind , SyntaxKind . MultiLineCommentTrivia ) ;
47
- } ) ;
48
31
} ) ;
49
32
}
You can’t perform that action at this time.
0 commit comments