Skip to content

Commit c556c1a

Browse files
committed
test(func-call-spacing): make tests more strict
1 parent fe0ce5a commit c556c1a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tests/lib/rules/func-call-spacing.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
*/
44
'use strict'
55

6-
const { RuleTester, ESLint } = require('../../eslint-compat')
7-
const semver = require('semver')
6+
const { RuleTester } = require('../../eslint-compat')
87
const rule = require('../../../lib/rules/func-call-spacing')
98

109
const tester = new RuleTester({
@@ -61,10 +60,9 @@ tester.run('func-call-spacing', rule, {
6160
`,
6261
errors: [
6362
{
64-
message: semver.lt(ESLint.version, '7.0.0')
65-
? 'Unexpected newline between function name and paren.'
66-
: 'Unexpected whitespace between function name and paren.',
67-
line: 3
63+
message: 'Unexpected whitespace between function name and paren.',
64+
line: 3,
65+
column: 20
6866
}
6967
]
7068
},
@@ -83,7 +81,8 @@ tester.run('func-call-spacing', rule, {
8381
errors: [
8482
{
8583
message: 'Missing space between function name and paren.',
86-
line: 3
84+
line: 3,
85+
column: 20
8786
}
8887
]
8988
},
@@ -104,10 +103,9 @@ tester.run('func-call-spacing', rule, {
104103
</style>`,
105104
errors: [
106105
{
107-
message: semver.lt(ESLint.version, '7.0.0')
108-
? 'Unexpected newline between function name and paren.'
109-
: 'Unexpected whitespace between function name and paren.',
110-
line: 4
106+
message: 'Unexpected whitespace between function name and paren.',
107+
line: 4,
108+
column: 24
111109
}
112110
]
113111
}

0 commit comments

Comments
 (0)