@@ -4,7 +4,7 @@ import tmp from 'tmp'
4
4
import * as path from 'path'
5
5
import {
6
6
// eslint-disable-next-line no-unused-vars
7
- it , fit , wait , beforeEach , afterEach ,
7
+ it , fit , wait , beforeEach , afterEach , expectAsync ,
8
8
} from 'jasmine-fix'
9
9
import { copyFileSync } from 'fs'
10
10
@@ -75,10 +75,11 @@ describe('The RuboCop provider for Linter', () => {
75
75
+ '(Using Ruby 2.3 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)'
76
76
77
77
const messages = await lint ( editor )
78
+ const description = await messages [ 0 ] . description ( )
78
79
79
80
expect ( messages [ 0 ] . severity ) . toBe ( 'error' )
80
81
expect ( messages [ 0 ] . excerpt ) . toBe ( msgText )
81
- expect ( messages [ 0 ] . description ) . not . toBeDefined ( )
82
+ expect ( description ) . toBe ( '' )
82
83
expect ( messages [ 0 ] . location . file ) . toBe ( badPath )
83
84
expect ( messages [ 0 ] . location . position ) . toEqual ( [ [ 1 , 6 ] , [ 1 , 7 ] ] )
84
85
} )
@@ -119,14 +120,15 @@ describe('The RuboCop provider for Linter', () => {
119
120
const msgText = 'Metrics/AbcSize: Assignment Branch Condition size for defaults is too high. [18.25/15]'
120
121
121
122
const messages = await lint ( editor )
123
+ const description = await messages [ 0 ] . description ( )
122
124
123
125
// We skip the position test because Rubocop versions before 0.52.0 returns
124
126
// a different length for the offense
125
127
expect ( messages [ 0 ] . severity ) . toBe ( 'info' )
126
128
expect ( messages [ 0 ] . excerpt ) . toBe ( msgText )
127
129
expect ( messages [ 0 ] . url ) . toMatch ( urlRegex )
128
130
expect ( messages [ 0 ] . location . file ) . toBe ( abcSizePath )
129
- expect ( messages [ 0 ] . description ) . not . toBeDefined ( )
131
+ expect ( description ) . toBe ( '' )
130
132
} )
131
133
} )
132
134
0 commit comments