@@ -34,17 +34,17 @@ describe('The ShellCheck provider for Linter', () => {
34
34
} ) ;
35
35
36
36
it ( 'handles messages from ShellCheck' , async ( ) => {
37
- const expectedMsg = 'Tips depend on target shell and yours is unknown. Add a shebang. ' +
38
- '[<a href=" https://github.com/koalaman/shellcheck/wiki/SC2148">SC2148</a>] ';
37
+ const expectedExcerpt = 'Tips depend on target shell and yours is unknown. Add a shebang. [SC2148]' ;
38
+ const expectedURL = ' https://github.com/koalaman/shellcheck/wiki/SC2148';
39
39
const editor = await atom . workspace . open ( badPath ) ;
40
40
const messages = await lint ( editor ) ;
41
41
42
42
expect ( messages . length ) . toBe ( 1 ) ;
43
- expect ( messages [ 0 ] . type ) . toBe ( 'error' ) ;
44
- expect ( messages [ 0 ] . text ) . not . toBeDefined ( ) ;
45
- expect ( messages [ 0 ] . html ) . toBe ( expectedMsg ) ;
46
- expect ( messages [ 0 ] . filePath ) . toBe ( badPath ) ;
47
- expect ( messages [ 0 ] . range ) . toEqual ( [ [ 0 , 0 ] , [ 0 , 4 ] ] ) ;
43
+ expect ( messages [ 0 ] . severity ) . toBe ( 'error' ) ;
44
+ expect ( messages [ 0 ] . excerpt ) . toBe ( expectedExcerpt ) ;
45
+ expect ( messages [ 0 ] . url ) . toBe ( expectedURL ) ;
46
+ expect ( messages [ 0 ] . location . file ) . toBe ( badPath ) ;
47
+ expect ( messages [ 0 ] . location . position ) . toEqual ( [ [ 0 , 0 ] , [ 0 , 4 ] ] ) ;
48
48
} ) ;
49
49
50
50
describe ( 'implements useProjectCwd and' , ( ) => {
@@ -65,7 +65,7 @@ describe('The ShellCheck provider for Linter', () => {
65
65
const editor = await atom . workspace . open ( sourceFileRelativePath ) ;
66
66
const messages = await lint ( editor ) ;
67
67
expect ( messages . length ) . toBe ( 1 ) ;
68
- expect ( messages [ 0 ] . html ) . toMatch ( / o p e n B i n a r y F i l e : d o e s n o t e x i s t / ) ;
68
+ expect ( messages [ 0 ] . excerpt ) . toMatch ( / o p e n B i n a r y F i l e : d o e s n o t e x i s t / ) ;
69
69
} ) ;
70
70
71
71
it ( 'uses project-relative source= directives via setting (based at fixtures/)' , async ( ) => {
@@ -80,7 +80,7 @@ describe('The ShellCheck provider for Linter', () => {
80
80
const editor = await atom . workspace . open ( sourceProjectRelativePath ) ;
81
81
const messages = await lint ( editor ) ;
82
82
expect ( messages . length ) . toBe ( 1 ) ;
83
- expect ( messages [ 0 ] . html ) . toMatch ( / o p e n B i n a r y F i l e : d o e s n o t e x i s t / ) ;
83
+ expect ( messages [ 0 ] . excerpt ) . toMatch ( / o p e n B i n a r y F i l e : d o e s n o t e x i s t / ) ;
84
84
} ) ;
85
85
} ) ;
86
86
} ) ;
0 commit comments