Skip to content

Commit

Permalink
Add test to verify that default files are not broken
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Nov 14, 2016
1 parent c277434 commit aca8740
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ node_js:
- "0.10"
- "0.12"
- "4.1"
branches:
only:
- master
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"gulp-util": "^3.0.0",
"lodash": "^4.12.0",
"minimatch": "^3.0.3",
"rcloader": "^0.2.1",
"rcloader": "^0.2.2",
"through2": "^2.0.0"
},
"peerDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions test/fixtures/project/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"undef": true,
"globals": {
"angular": false
}
}
1 change: 1 addition & 0 deletions test/fixtures/project/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular();
22 changes: 22 additions & 0 deletions test/specs/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var Fixture = require('../util').Fixture;
var jshint = require('../../src');
var resolve = require('path').resolve;
var should = require('should');

describe('Config', function () {
it('pointing to a specific config file works (issue #152)', function (done) {
var stream = jshint(resolve(__dirname, '../fixtures/project/.jshintrc'));

stream.on('data', function (file) {
should(file.jshint.results).be.undefined();
});

stream.once('end', function () {
done();
});

stream.write(new Fixture('project/src/index.js'));
stream.write(new Fixture('project/src/index.js'));
stream.end();
});
});
1 change: 1 addition & 0 deletions test/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ describe('gulp-jshint', function () {
require('./linting');
require('./reporters');
require('./integration');
require('./config');
});

0 comments on commit aca8740

Please sign in to comment.