Skip to content

Commit aca8740

Browse files
author
spalger
committed
Add test to verify that default files are not broken
1 parent c277434 commit aca8740

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ node_js:
77
- "0.10"
88
- "0.12"
99
- "4.1"
10+
branches:
11+
only:
12+
- master

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"gulp-util": "^3.0.0",
2020
"lodash": "^4.12.0",
2121
"minimatch": "^3.0.3",
22-
"rcloader": "^0.2.1",
22+
"rcloader": "^0.2.2",
2323
"through2": "^2.0.0"
2424
},
2525
"peerDependencies": {

test/fixtures/project/.jshintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"undef": true,
3+
"globals": {
4+
"angular": false
5+
}
6+
}

test/fixtures/project/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
angular();

test/specs/config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var Fixture = require('../util').Fixture;
2+
var jshint = require('../../src');
3+
var resolve = require('path').resolve;
4+
var should = require('should');
5+
6+
describe('Config', function () {
7+
it('pointing to a specific config file works (issue #152)', function (done) {
8+
var stream = jshint(resolve(__dirname, '../fixtures/project/.jshintrc'));
9+
10+
stream.on('data', function (file) {
11+
should(file.jshint.results).be.undefined();
12+
});
13+
14+
stream.once('end', function () {
15+
done();
16+
});
17+
18+
stream.write(new Fixture('project/src/index.js'));
19+
stream.write(new Fixture('project/src/index.js'));
20+
stream.end();
21+
});
22+
});

test/specs/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ describe('gulp-jshint', function () {
2626
require('./linting');
2727
require('./reporters');
2828
require('./integration');
29+
require('./config');
2930
});

0 commit comments

Comments
 (0)