Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit b759091

Browse files
vzamanilloVíctor Zamanillo
authored andcommitted
fix: fixed description on spec
1 parent cf1ab43 commit b759091

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spec/linter-rubocop-spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import tmp from 'tmp'
44
import * as path from 'path'
55
import {
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'
99
import { 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

Comments
 (0)