@@ -50,17 +50,17 @@ ruleTester.run('prefer-to-contain', rule, {
50
50
{
51
51
code : "expect(a['includes'](b)).not.toEqual(false);" ,
52
52
output : 'expect(a).toContain(b);' ,
53
- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
53
+ errors : [ { messageId : 'useToContain' , column : 30 , line : 1 } ] ,
54
54
} ,
55
55
{
56
56
code : "expect(a['includes'](b))['not'].toEqual(false);" ,
57
57
output : 'expect(a).toContain(b);' ,
58
- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
58
+ errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
59
59
} ,
60
60
{
61
61
code : "expect(a['includes'](b))['not']['toEqual'](false);" ,
62
62
output : 'expect(a).toContain(b);' ,
63
- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
63
+ errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
64
64
} ,
65
65
{
66
66
code : 'expect(a.includes(b)).toEqual(false);' ,
@@ -70,12 +70,12 @@ ruleTester.run('prefer-to-contain', rule, {
70
70
{
71
71
code : 'expect(a.includes(b)).not.toEqual(false);' ,
72
72
output : 'expect(a).toContain(b);' ,
73
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
73
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
74
74
} ,
75
75
{
76
76
code : 'expect(a.includes(b)).not.toEqual(true);' ,
77
77
output : 'expect(a).not.toContain(b);' ,
78
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
78
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
79
79
} ,
80
80
{
81
81
code : 'expect(a.includes(b)).toBe(true);' ,
@@ -90,12 +90,12 @@ ruleTester.run('prefer-to-contain', rule, {
90
90
{
91
91
code : 'expect(a.includes(b)).not.toBe(false);' ,
92
92
output : 'expect(a).toContain(b);' ,
93
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
93
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
94
94
} ,
95
95
{
96
96
code : 'expect(a.includes(b)).not.toBe(true);' ,
97
97
output : 'expect(a).not.toContain(b);' ,
98
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
98
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
99
99
} ,
100
100
{
101
101
code : 'expect(a.includes(b)).toStrictEqual(true);' ,
@@ -110,12 +110,12 @@ ruleTester.run('prefer-to-contain', rule, {
110
110
{
111
111
code : 'expect(a.includes(b)).not.toStrictEqual(false);' ,
112
112
output : 'expect(a).toContain(b);' ,
113
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
113
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
114
114
} ,
115
115
{
116
116
code : 'expect(a.includes(b)).not.toStrictEqual(true);' ,
117
117
output : 'expect(a).not.toContain(b);' ,
118
- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
118
+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
119
119
} ,
120
120
{
121
121
code : 'expect(a.test(t).includes(b.test(p))).toEqual(true);' ,
@@ -130,12 +130,12 @@ ruleTester.run('prefer-to-contain', rule, {
130
130
{
131
131
code : 'expect(a.test(t).includes(b.test(p))).not.toEqual(true);' ,
132
132
output : 'expect(a.test(t)).not.toContain(b.test(p));' ,
133
- errors : [ { messageId : 'useToContain' , column : 39 , line : 1 } ] ,
133
+ errors : [ { messageId : 'useToContain' , column : 43 , line : 1 } ] ,
134
134
} ,
135
135
{
136
136
code : 'expect(a.test(t).includes(b.test(p))).not.toEqual(false);' ,
137
137
output : 'expect(a.test(t)).toContain(b.test(p));' ,
138
- errors : [ { messageId : 'useToContain' , column : 39 , line : 1 } ] ,
138
+ errors : [ { messageId : 'useToContain' , column : 43 , line : 1 } ] ,
139
139
} ,
140
140
{
141
141
code : 'expect([{a:1}].includes({a:1})).toBe(true);' ,
@@ -150,12 +150,12 @@ ruleTester.run('prefer-to-contain', rule, {
150
150
{
151
151
code : 'expect([{a:1}].includes({a:1})).not.toBe(true);' ,
152
152
output : 'expect([{a:1}]).not.toContain({a:1});' ,
153
- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
153
+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
154
154
} ,
155
155
{
156
156
code : 'expect([{a:1}].includes({a:1})).not.toBe(false);' ,
157
157
output : 'expect([{a:1}]).toContain({a:1});' ,
158
- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
158
+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
159
159
} ,
160
160
{
161
161
code : 'expect([{a:1}].includes({a:1})).toStrictEqual(true);' ,
@@ -170,12 +170,12 @@ ruleTester.run('prefer-to-contain', rule, {
170
170
{
171
171
code : 'expect([{a:1}].includes({a:1})).not.toStrictEqual(true);' ,
172
172
output : 'expect([{a:1}]).not.toContain({a:1});' ,
173
- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
173
+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
174
174
} ,
175
175
{
176
176
code : 'expect([{a:1}].includes({a:1})).not.toStrictEqual(false);' ,
177
177
output : 'expect([{a:1}]).toContain({a:1});' ,
178
- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
178
+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
179
179
} ,
180
180
] ,
181
181
} ) ;
0 commit comments