@@ -7,6 +7,7 @@ const here = path.join.bind(null, __dirname);
7
7
8
8
const SIMPLE = here ( 'fixtures/simple' ) ;
9
9
const EXTENDS_ROOT = here ( 'fixtures/extends-root' ) ;
10
+ const EMPTY = here ( 'fixtures/empty' ) ;
10
11
11
12
const cli = ( input = '' , args = [ ] , opts = { } ) => {
12
13
const c = execa ( here ( 'cli.js' ) , args , {
@@ -22,24 +23,24 @@ test('should throw when called without [input]', t => {
22
23
} ) ;
23
24
24
25
test ( 'should reprint input from stdin' , async t => {
25
- const actual = await cli ( 'foo: bar' ) ;
26
+ const actual = await cli ( 'foo: bar' , [ ] , { cwd : EMPTY } ) ;
26
27
t . true ( actual . stdout . includes ( 'foo: bar' ) ) ;
27
28
} ) ;
28
29
29
30
test ( 'should produce no success output with --quiet flag' , async t => {
30
- const actual = await cli ( 'foo: bar' , [ '--quiet' ] ) ;
31
+ const actual = await cli ( 'foo: bar' , [ '--quiet' ] , { cwd : EMPTY } ) ;
31
32
t . is ( actual . stdout , '' ) ;
32
33
t . is ( actual . stderr , '' ) ;
33
34
} ) ;
34
35
35
36
test ( 'should produce no success output with -q flag' , async t => {
36
- const actual = await cli ( 'foo: bar' , [ '-q' ] ) ;
37
+ const actual = await cli ( 'foo: bar' , [ '-q' ] , { cwd : EMPTY } ) ;
37
38
t . is ( actual . stdout , '' ) ;
38
39
t . is ( actual . stderr , '' ) ;
39
40
} ) ;
40
41
41
42
test ( 'should succeed for input from stdin without rules' , async t => {
42
- const actual = await cli ( 'foo: bar' ) ;
43
+ const actual = await cli ( 'foo: bar' , [ ] , { cwd : EMPTY } ) ;
43
44
t . is ( actual . code , 0 ) ;
44
45
} ) ;
45
46
0 commit comments