@@ -50,17 +50,17 @@ ruleTester.run('prefer-to-contain', rule, {
5050 {
5151 code : "expect(a['includes'](b)).not.toEqual(false);" ,
5252 output : 'expect(a).toContain(b);' ,
53- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
53+ errors : [ { messageId : 'useToContain' , column : 30 , line : 1 } ] ,
5454 } ,
5555 {
5656 code : "expect(a['includes'](b))['not'].toEqual(false);" ,
5757 output : 'expect(a).toContain(b);' ,
58- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
58+ errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
5959 } ,
6060 {
6161 code : "expect(a['includes'](b))['not']['toEqual'](false);" ,
6262 output : 'expect(a).toContain(b);' ,
63- errors : [ { messageId : 'useToContain' , column : 26 , line : 1 } ] ,
63+ errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
6464 } ,
6565 {
6666 code : 'expect(a.includes(b)).toEqual(false);' ,
@@ -70,12 +70,12 @@ ruleTester.run('prefer-to-contain', rule, {
7070 {
7171 code : 'expect(a.includes(b)).not.toEqual(false);' ,
7272 output : 'expect(a).toContain(b);' ,
73- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
73+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
7474 } ,
7575 {
7676 code : 'expect(a.includes(b)).not.toEqual(true);' ,
7777 output : 'expect(a).not.toContain(b);' ,
78- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
78+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
7979 } ,
8080 {
8181 code : 'expect(a.includes(b)).toBe(true);' ,
@@ -90,12 +90,12 @@ ruleTester.run('prefer-to-contain', rule, {
9090 {
9191 code : 'expect(a.includes(b)).not.toBe(false);' ,
9292 output : 'expect(a).toContain(b);' ,
93- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
93+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
9494 } ,
9595 {
9696 code : 'expect(a.includes(b)).not.toBe(true);' ,
9797 output : 'expect(a).not.toContain(b);' ,
98- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
98+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
9999 } ,
100100 {
101101 code : 'expect(a.includes(b)).toStrictEqual(true);' ,
@@ -110,12 +110,12 @@ ruleTester.run('prefer-to-contain', rule, {
110110 {
111111 code : 'expect(a.includes(b)).not.toStrictEqual(false);' ,
112112 output : 'expect(a).toContain(b);' ,
113- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
113+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
114114 } ,
115115 {
116116 code : 'expect(a.includes(b)).not.toStrictEqual(true);' ,
117117 output : 'expect(a).not.toContain(b);' ,
118- errors : [ { messageId : 'useToContain' , column : 23 , line : 1 } ] ,
118+ errors : [ { messageId : 'useToContain' , column : 27 , line : 1 } ] ,
119119 } ,
120120 {
121121 code : 'expect(a.test(t).includes(b.test(p))).toEqual(true);' ,
@@ -130,12 +130,12 @@ ruleTester.run('prefer-to-contain', rule, {
130130 {
131131 code : 'expect(a.test(t).includes(b.test(p))).not.toEqual(true);' ,
132132 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 } ] ,
134134 } ,
135135 {
136136 code : 'expect(a.test(t).includes(b.test(p))).not.toEqual(false);' ,
137137 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 } ] ,
139139 } ,
140140 {
141141 code : 'expect([{a:1}].includes({a:1})).toBe(true);' ,
@@ -150,12 +150,12 @@ ruleTester.run('prefer-to-contain', rule, {
150150 {
151151 code : 'expect([{a:1}].includes({a:1})).not.toBe(true);' ,
152152 output : 'expect([{a:1}]).not.toContain({a:1});' ,
153- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
153+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
154154 } ,
155155 {
156156 code : 'expect([{a:1}].includes({a:1})).not.toBe(false);' ,
157157 output : 'expect([{a:1}]).toContain({a:1});' ,
158- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
158+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
159159 } ,
160160 {
161161 code : 'expect([{a:1}].includes({a:1})).toStrictEqual(true);' ,
@@ -170,12 +170,12 @@ ruleTester.run('prefer-to-contain', rule, {
170170 {
171171 code : 'expect([{a:1}].includes({a:1})).not.toStrictEqual(true);' ,
172172 output : 'expect([{a:1}]).not.toContain({a:1});' ,
173- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
173+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
174174 } ,
175175 {
176176 code : 'expect([{a:1}].includes({a:1})).not.toStrictEqual(false);' ,
177177 output : 'expect([{a:1}]).toContain({a:1});' ,
178- errors : [ { messageId : 'useToContain' , column : 33 , line : 1 } ] ,
178+ errors : [ { messageId : 'useToContain' , column : 37 , line : 1 } ] ,
179179 } ,
180180 ] ,
181181} ) ;
0 commit comments