@@ -8,33 +8,42 @@ describe('The htmlhint provider for Linter', () => {
8
8
beforeEach ( ( ) => {
9
9
atom . workspace . destroyActivePaneItem ( ) ;
10
10
waitsForPromise ( ( ) =>
11
- atom . packages . activatePackage ( 'linter-htmlhint' ) . then ( ( ) =>
12
- atom . packages . activatePackage ( 'language-html' )
13
- )
11
+ atom
12
+ . packages
13
+ . activatePackage ( 'linter-htmlhint' )
14
+ . then ( ( ) => atom . packages . activatePackage ( 'language-html' ) )
14
15
) ;
15
16
} ) ;
16
17
17
18
it ( 'detects invalid coding style in bad.html and report as error' , ( ) => {
18
19
waitsForPromise ( ( ) => {
19
20
const bad = path . join ( __dirname , 'fixtures' , 'bad.html' ) ;
20
- return atom . workspace . open ( bad ) . then ( editor => lint ( editor ) ) . then ( messages => {
21
- expect ( messages . length ) . toEqual ( 1 ) ;
21
+ return atom
22
+ . workspace
23
+ . open ( bad )
24
+ . then ( editor => lint ( editor ) )
25
+ . then ( messages => {
26
+ expect ( messages . length ) . toEqual ( 1 ) ;
22
27
23
- // test only the first error
24
- expect ( messages [ 0 ] . type ) . toEqual ( 'error' ) ;
25
- expect ( messages [ 0 ] . text ) . toEqual ( 'Doctype must be declared first.' ) ;
26
- expect ( messages [ 0 ] . filePath ) . toMatch ( / .+ b a d \. h t m l $ / ) ;
27
- expect ( messages [ 0 ] . range ) . toEqual ( [ [ 0 , 0 ] , [ 0 , 13 ] ] ) ;
28
- } ) ;
28
+ // test only the first error
29
+ expect ( messages [ 0 ] . type ) . toEqual ( 'error' ) ;
30
+ expect ( messages [ 0 ] . text ) . toEqual ( 'Doctype must be declared first.' ) ;
31
+ expect ( messages [ 0 ] . filePath ) . toMatch ( / .+ b a d \. h t m l $ / ) ;
32
+ expect ( messages [ 0 ] . range ) . toEqual ( [ [ 0 , 0 ] , [ 0 , 13 ] ] ) ;
33
+ } ) ;
29
34
} ) ;
30
35
} ) ;
31
36
32
37
it ( 'finds nothing wrong with a valid file (good.html)' , ( ) => {
33
38
waitsForPromise ( ( ) => {
34
39
const good = path . join ( __dirname , 'fixtures' , 'good.html' ) ;
35
- return atom . workspace . open ( good ) . then ( editor => lint ( editor ) ) . then ( messages => {
36
- expect ( messages . length ) . toEqual ( 0 ) ;
37
- } ) ;
40
+ return atom
41
+ . workspace
42
+ . open ( good )
43
+ . then ( editor => lint ( editor ) )
44
+ . then ( messages => {
45
+ expect ( messages . length ) . toEqual ( 0 ) ;
46
+ } ) ;
38
47
} ) ;
39
48
} ) ;
40
49
} ) ;
0 commit comments