File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -346,8 +346,11 @@ class Comb {
346
346
let filename = options && options . filename || '' ;
347
347
let context = options && options . context ;
348
348
let tree ;
349
+ const lint = this . lint ;
349
350
350
- if ( ! text ) return this . lint ? [ ] : text ;
351
+ if ( ! text ) return new Promise ( function ( resolve ) {
352
+ resolve ( lint ? [ ] : text ) ;
353
+ } ) ;
351
354
352
355
if ( ! syntax ) syntax = 'css' ;
353
356
this . syntax = syntax ;
Original file line number Diff line number Diff line change @@ -169,6 +169,13 @@ describe('scss', function() {
169
169
return test . shouldBeEqual ( 'content.scss' ) ;
170
170
} ) ;
171
171
172
+ it ( 'Should parse an empty file' , function ( ) {
173
+ let test = new Test ( this ) ;
174
+ test . comb . configure ( { } ) ;
175
+
176
+ return test . shouldBeEqual ( 'empty.scss' ) ;
177
+ } ) ;
178
+
172
179
it ( 'Should parse functions' , function ( ) {
173
180
let test = new Test ( this ) ;
174
181
test . comb . configure ( { } ) ;
You can’t perform that action at this time.
0 commit comments