Skip to content

Commit

Permalink
Add ".eslintignore" test
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Mar 31, 2017
1 parent 05de07a commit b69e3af
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/eslint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,27 @@ describe('broccoli-lint-eslint', function() {
yield expect(output.build()).to.be.fulfilled;
}));
});

describe('.eslintignore', function() {
// this doesn't seem to work... :(
it.skip('excludes files from being linted', co.wrap(function *() {
input.write({
'.eslintrc.js': `module.exports = { rules: { 'no-console': 'error', 'no-unused-vars': 'warn' } };\n`,
'.eslintignore': `a.js\n`,
'a.js': `console.log('foo');\n`,
'b.js': `var foo = 5;\n`,
});

output = createBuilder(eslint(input.path(), { console, testGenerator: 'qunit' }));

yield output.build();

let result = output.read();
expect(Object.keys(result)).to.deep.equal([
'.eslintignore',
'.eslintrc.lint-test.js',
'b.lint-test.js',
]);
}));
});
});

0 comments on commit b69e3af

Please sign in to comment.