File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,14 @@ tape.test("tokenize", function(test) {
2727
2828 tn = tokenize ( "// line comment" ) ;
2929 test . equal ( tn . next ( ) , null , "should skip line comments on a single line" ) ;
30- tn = tokenize ( "/// line comment\n" ) ;
31- test . equal ( tn . cmnt ( 1 ) , "line comment" , "should peek for trailing line comments when on the next line" ) ;
30+ tn = tokenize ( "a /// line comment\n" ) ;
31+ tn . next ( ) ;
32+ test . equal ( tn . cmnt ( 1 ) , "line comment" , "should peek for trailing line comments" ) ;
3233 tn = tokenize ( "/* block comment */" ) ;
3334 test . equal ( tn . next ( ) , null , "should skip block comments on a single line" ) ;
3435 tn = tokenize ( "/// line comment\na\n" ) ;
3536 tn . next ( ) ;
36- test . equal ( tn . cmnt ( 1 ) , "line comment" , "should keep leading comments around while on the next line" ) ;
37+ test . equal ( tn . cmnt ( ) , "line comment" , "should keep leading comments around while on the next line" ) ;
3738
3839 test . ok ( expectError ( "something; /" ) , "should throw for unterminated line comments" ) ;
3940 test . ok ( expectError ( "something; /* comment" ) , "should throw for unterminated block comments" ) ;
You can’t perform that action at this time.
0 commit comments