Skip to content

Commit 298ac6f

Browse files
committed
chore(eslint): clean up tests
1 parent 77c09c8 commit 298ac6f

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

packages/eslint/test/fixtures/no-node-modules.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/eslint/test/test.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ test('runs with the plugin', async (t) => {
1010
input: 'test/fixtures/all-good',
1111
plugins: [eslint()]
1212
});
13-
const { output } = await bundle.generate({ file: '' });
13+
const { output } = await bundle.generate({});
14+
const [{ code }] = output;
1415

15-
t.true(output[0].code.length > 0);
16+
t.true(code.length > 0);
1617
});
1718

1819
test('autofix works', async (t) => {
@@ -22,20 +23,11 @@ test('autofix works', async (t) => {
2223
input: 'test/fixtures/will-fix',
2324
plugins: [eslint({ fix: true })]
2425
});
25-
const { output } = await bundle.generate({ file: '' });
26+
const { output } = await bundle.generate({});
27+
const [{ code }] = output;
2628

2729
// revert file contents
2830
fs.writeFileSync('test/fixtures/will-fix.js', originalFileContents);
2931

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'));
4133
});

0 commit comments

Comments
 (0)