Skip to content

Commit 08b9212

Browse files
committed
test the case where babel-eslint is actually useful
1 parent eb98701 commit 08b9212

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/linting.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,32 @@ const BufferStreams = require('bufferstreams');
1212
require('mocha');
1313

1414
describe('gulp-eslint plugin', () => {
15-
1615
it('should configure an alternate parser', done => {
1716
eslint({
1817
parser: 'babel-eslint',
1918
useEslintrc: false,
20-
rules: {'arrow-parens': 2}
19+
rules: {'prefer-template': 'error'}
2120
})
2221
.on('error', done)
2322
.on('data', file => {
2423
should.exist(file);
2524
should.exist(file.contents);
2625
should.exist(file.eslint);
27-
file.eslint.should.have.property('filePath', path.resolve('test/fixtures/es6.js'));
26+
file.eslint.should.have.property('filePath', path.resolve('test/fixtures/stage0-class-property.js'));
2827

2928
file.eslint.messages
3029
.should.be.instanceof(Array)
3130
.and.have.lengthOf(1);
3231

3332
file.eslint.messages[0]
3433
.should.have.properties('message', 'line', 'column')
35-
.and.have.property('ruleId', 'arrow-parens');
34+
.and.have.property('ruleId', 'prefer-template');
3635

3736
done();
3837
})
3938
.end(new File({
40-
path: 'test/fixtures/es6.js',
41-
contents: new Buffer('(a=>`${a}b`)("a");')
39+
path: 'test/fixtures/stage0-class-property.js',
40+
contents: new Buffer('class MyClass {prop = a + "b" + c;}')
4241
}));
4342
});
4443

0 commit comments

Comments
 (0)