@@ -4,7 +4,7 @@ import tmp from 'tmp'
44import * as path from 'path'
55import {
66 // eslint-disable-next-line no-unused-vars
7- it , fit , wait , beforeEach , afterEach ,
7+ it , fit , wait , beforeEach , afterEach , expectAsync ,
88} from 'jasmine-fix'
99import { copyFileSync } from 'fs'
1010
@@ -75,10 +75,11 @@ describe('The RuboCop provider for Linter', () => {
7575 + '(Using Ruby 2.3 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)'
7676
7777 const messages = await lint ( editor )
78+ const description = await messages [ 0 ] . description ( )
7879
7980 expect ( messages [ 0 ] . severity ) . toBe ( 'error' )
8081 expect ( messages [ 0 ] . excerpt ) . toBe ( msgText )
81- expect ( messages [ 0 ] . description ) . not . toBeDefined ( )
82+ expect ( description ) . toBe ( '' )
8283 expect ( messages [ 0 ] . location . file ) . toBe ( badPath )
8384 expect ( messages [ 0 ] . location . position ) . toEqual ( [ [ 1 , 6 ] , [ 1 , 7 ] ] )
8485 } )
@@ -119,14 +120,15 @@ describe('The RuboCop provider for Linter', () => {
119120 const msgText = 'Metrics/AbcSize: Assignment Branch Condition size for defaults is too high. [18.25/15]'
120121
121122 const messages = await lint ( editor )
123+ const description = await messages [ 0 ] . description ( )
122124
123125 // We skip the position test because Rubocop versions before 0.52.0 returns
124126 // a different length for the offense
125127 expect ( messages [ 0 ] . severity ) . toBe ( 'info' )
126128 expect ( messages [ 0 ] . excerpt ) . toBe ( msgText )
127129 expect ( messages [ 0 ] . url ) . toMatch ( urlRegex )
128130 expect ( messages [ 0 ] . location . file ) . toBe ( abcSizePath )
129- expect ( messages [ 0 ] . description ) . not . toBeDefined ( )
131+ expect ( description ) . toBe ( '' )
130132 } )
131133 } )
132134
0 commit comments