Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Krasnoyarov committed Aug 4, 2016
1 parent 42fda4f commit 64c407d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/__tests__/standalone-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,14 @@ test('should load config', (t) => {
}).catch(logError);
});

test('should throw error of config file not found', (t) => {
t.plan(1);

return standalone({
files: `${fixturesPath}/svg-icons/**/*`,
configFile: `${fixturesPath}/configs/.not-exist-webfontrc`,
quite: true
}).catch((error) => {
t.true(error.code === 'ENOENT');
});
});
4 changes: 0 additions & 4 deletions src/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ function buildConfig(options) {
}

const cosmiconfigOptions = {
// Turn off argv option to avoid hijacking the all-too-common
// `--config` argument when stylelint is used in conjunction with other CLI's
// (e.g. webpack)
argv: false,
// Allow extensions on rc filenames
rcExtensions: true
};
Expand Down

0 comments on commit 64c407d

Please sign in to comment.