File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -12,33 +12,32 @@ const BufferStreams = require('bufferstreams');
12
12
require ( 'mocha' ) ;
13
13
14
14
describe ( 'gulp-eslint plugin' , ( ) => {
15
-
16
15
it ( 'should configure an alternate parser' , done => {
17
16
eslint ( {
18
17
parser : 'babel-eslint' ,
19
18
useEslintrc : false ,
20
- rules : { 'arrow-parens ' : 2 }
19
+ rules : { 'prefer-template ' : 'error' }
21
20
} )
22
21
. on ( 'error' , done )
23
22
. on ( 'data' , file => {
24
23
should . exist ( file ) ;
25
24
should . exist ( file . contents ) ;
26
25
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' ) ) ;
28
27
29
28
file . eslint . messages
30
29
. should . be . instanceof ( Array )
31
30
. and . have . lengthOf ( 1 ) ;
32
31
33
32
file . eslint . messages [ 0 ]
34
33
. should . have . properties ( 'message' , 'line' , 'column' )
35
- . and . have . property ( 'ruleId' , 'arrow-parens ' ) ;
34
+ . and . have . property ( 'ruleId' , 'prefer-template ' ) ;
36
35
37
36
done ( ) ;
38
37
} )
39
38
. 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;} ' )
42
41
} ) ) ;
43
42
} ) ;
44
43
You can’t perform that action at this time.
0 commit comments