@@ -10,9 +10,10 @@ test('runs with the plugin', async (t) => {
10
10
input : 'test/fixtures/all-good' ,
11
11
plugins : [ eslint ( ) ]
12
12
} ) ;
13
- const { output } = await bundle . generate ( { file : '' } ) ;
13
+ const { output } = await bundle . generate ( { } ) ;
14
+ const [ { code } ] = output ;
14
15
15
- t . true ( output [ 0 ] . code . length > 0 ) ;
16
+ t . true ( code . length > 0 ) ;
16
17
} ) ;
17
18
18
19
test ( 'autofix works' , async ( t ) => {
@@ -22,20 +23,11 @@ test('autofix works', async (t) => {
22
23
input : 'test/fixtures/will-fix' ,
23
24
plugins : [ eslint ( { fix : true } ) ]
24
25
} ) ;
25
- const { output } = await bundle . generate ( { file : '' } ) ;
26
+ const { output } = await bundle . generate ( { } ) ;
27
+ const [ { code } ] = output ;
26
28
27
29
// revert file contents
28
30
fs . writeFileSync ( 'test/fixtures/will-fix.js' , originalFileContents ) ;
29
31
30
- t . true ( output [ 0 ] . code . includes ( 'const func' ) ) ;
31
- } ) ;
32
-
33
- test ( 'ignores node_modules' , async ( t ) => {
34
- const bundle = await rollup ( {
35
- input : 'test/fixtures/no-node-modules' ,
36
- plugins : [ eslint ( ) ]
37
- } ) ;
38
- const { output } = await bundle . generate ( { file : '' } ) ;
39
-
40
- t . true ( output [ 0 ] . code . length > 0 ) ;
32
+ t . true ( code . includes ( 'const func' ) ) ;
41
33
} ) ;
0 commit comments