@@ -11,7 +11,7 @@ import {engine} from '../index.js'
11
11
const fixtures = path . join ( 'test' , 'fixtures' )
12
12
13
13
test ( 'input' , ( t ) => {
14
- t . plan ( 19 )
14
+ t . plan ( 20 )
15
15
16
16
t . test ( 'should fail without input' , ( t ) => {
17
17
const stream = new PassThrough ( )
@@ -364,7 +364,7 @@ test('input', (t) => {
364
364
)
365
365
} )
366
366
367
- t . test ( 'should not atempt to read files with `value` (1)' , ( t ) => {
367
+ t . test ( 'should not attempt to read files with `value` (1)' , ( t ) => {
368
368
const stderr = spy ( )
369
369
const cwd = path . join ( fixtures , 'ignore-file' )
370
370
const file = toVFile ( {
@@ -400,7 +400,7 @@ test('input', (t) => {
400
400
)
401
401
} )
402
402
403
- t . test ( 'should not atempt to read files with `value` (2)' , ( t ) => {
403
+ t . test ( 'should not attempt to read files with `value` (2)' , ( t ) => {
404
404
const stderr = spy ( )
405
405
const cwd = path . join ( fixtures , 'ignore-file' )
406
406
const file = toVFile ( {
@@ -428,6 +428,33 @@ test('input', (t) => {
428
428
)
429
429
} )
430
430
431
+ t . test ( 'should not attempt to read files with `value` (3)' , ( t ) => {
432
+ const stderr = spy ( )
433
+ const cwd = path . join ( fixtures , 'empty' )
434
+ const file = toVFile ( { value : 'foo' } )
435
+
436
+ t . plan ( 1 )
437
+
438
+ engine (
439
+ { processor : noop , cwd, streamError : stderr . stream , files : [ file ] } ,
440
+ ( error , code ) => {
441
+ t . deepEqual (
442
+ [ error , code , stderr ( ) ] ,
443
+ [
444
+ null ,
445
+ 0 ,
446
+ 'test' +
447
+ path . sep +
448
+ 'fixtures' +
449
+ path . sep +
450
+ 'empty: no issues found\n'
451
+ ] ,
452
+ 'should report'
453
+ )
454
+ }
455
+ )
456
+ } )
457
+
431
458
t . test ( 'should include given ignored files (#2)' , ( t ) => {
432
459
const stderr = spy ( )
433
460
0 commit comments