Skip to content

Commit

Permalink
Add failing test fixture for overriding default ignores.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestalmage committed Jan 3, 2016
1 parent 5010bd7 commit 299e9d9
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/cli.js
Expand Up @@ -16,3 +16,8 @@ test('overrides fixture', async t => {
const cwd = path.join(__dirname, 'fixtures/overrides');
await execa('../../../cli.js', ['--no-local'], {cwd});
});

test('ignores fixture', async t => {
const cwd = path.join(__dirname, 'fixtures/ignores');
t.throws(execa('../../../cli.js', ['--no-local'], {cwd}));
});
5 changes: 5 additions & 0 deletions test/fixtures/ignores/index.js
@@ -0,0 +1,5 @@
'use strict';

module.exports = function () {
return 'this module should not have any errors';
};
9 changes: 9 additions & 0 deletions test/fixtures/ignores/package.json
@@ -0,0 +1,9 @@
{
"name": "application-name",
"version": "0.0.1",
"xo": {
"ignore": [
"{test/,}fixture{s,}/**"
]
}
}
9 changes: 9 additions & 0 deletions test/fixtures/ignores/test/fixtures/linter-error.js
@@ -0,0 +1,9 @@
'use strict';


module.exports = function () {


return "all kinds of errors in this file"

};
5 changes: 5 additions & 0 deletions test/fixtures/ignores/test/foo.js
@@ -0,0 +1,5 @@
'use strict';

module.exports = function () {
return 'this module should not have any errors';
};

0 comments on commit 299e9d9

Please sign in to comment.