@@ -34,17 +34,17 @@ describe('The ShellCheck provider for Linter', () => {
3434 } ) ;
3535
3636 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';
3939 const editor = await atom . workspace . open ( badPath ) ;
4040 const messages = await lint ( editor ) ;
4141
4242 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 ] ] ) ;
4848 } ) ;
4949
5050 describe ( 'implements useProjectCwd and' , ( ) => {
@@ -65,7 +65,7 @@ describe('The ShellCheck provider for Linter', () => {
6565 const editor = await atom . workspace . open ( sourceFileRelativePath ) ;
6666 const messages = await lint ( editor ) ;
6767 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 / ) ;
6969 } ) ;
7070
7171 it ( 'uses project-relative source= directives via setting (based at fixtures/)' , async ( ) => {
@@ -80,7 +80,7 @@ describe('The ShellCheck provider for Linter', () => {
8080 const editor = await atom . workspace . open ( sourceProjectRelativePath ) ;
8181 const messages = await lint ( editor ) ;
8282 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 / ) ;
8484 } ) ;
8585 } ) ;
8686} ) ;
0 commit comments