Skip to content

Commit fc4d75b

Browse files
authored
test(no-constant-condition): make tests more strict (#2866)
1 parent b399a6b commit fc4d75b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/lib/rules/no-constant-condition.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ tester.run('no-constant-condition', rule, {
2424
{
2525
messageId: 'unexpected',
2626
type: 'UnaryExpression',
27+
line: 1,
2728
column: 31,
29+
endLine: 1,
2830
endColumn: 33
2931
}
3032
]
@@ -35,7 +37,9 @@ tester.run('no-constant-condition', rule, {
3537
{
3638
messageId: 'unexpected',
3739
type: 'Literal',
40+
line: 1,
3841
column: 36,
42+
endLine: 1,
3943
endColumn: 40
4044
}
4145
]
@@ -46,7 +50,9 @@ tester.run('no-constant-condition', rule, {
4650
{
4751
messageId: 'unexpected',
4852
type: 'Literal',
53+
line: 1,
4954
column: 31,
55+
endLine: 1,
5056
endColumn: 32
5157
}
5258
]
@@ -57,7 +63,9 @@ tester.run('no-constant-condition', rule, {
5763
{
5864
messageId: 'unexpected',
5965
type: 'ObjectExpression',
66+
line: 1,
6067
column: 33,
68+
endLine: 1,
6169
endColumn: 35
6270
}
6371
]
@@ -68,7 +76,9 @@ tester.run('no-constant-condition', rule, {
6876
{
6977
messageId: 'unexpected',
7078
type: 'BinaryExpression',
79+
line: 1,
7180
column: 31,
81+
endLine: 1,
7282
endColumn: 36
7383
}
7484
]
@@ -79,7 +89,9 @@ tester.run('no-constant-condition', rule, {
7989
{
8090
messageId: 'unexpected',
8191
type: 'LogicalExpression',
92+
line: 1,
8293
column: 31,
94+
endLine: 1,
8395
endColumn: 37
8496
}
8597
]

0 commit comments

Comments
 (0)