@@ -26,92 +26,119 @@ ruleTester.run('no-only-test', rule, {
2626	invalid : [ 
2727		{ 
2828			code : header  +  'test\n\t.only(t => { t.pass(); });' , 
29- 			output : header  +  'test\n\t(t => { t.pass(); });' , 
3029			errors : [ { 
3130				message, 
3231				type : 'Identifier' , 
3332				line : 3 , 
34- 				column : 3 
33+ 				column : 3 , 
34+ 				suggestions : [ { 
35+ 					desc : 'Remove the `.only`' , 
36+ 					output : header  +  'test\n\t(t => { t.pass(); });' 
37+ 				} ] 
3538			} ] 
3639		} , 
3740		{ 
3841			code : header  +  'test\n  .only(t => { t.pass(); });' , 
39- 			output : header  +  'test\n  (t => { t.pass(); });' , 
4042			errors : [ { 
4143				message, 
4244				type : 'Identifier' , 
4345				line : 3 , 
44- 				column : 4 
46+ 				column : 4 , 
47+ 				suggestions : [ { 
48+ 					desc : 'Remove the `.only`' , 
49+ 					output : header  +  'test\n  (t => { t.pass(); });' 
50+ 				} ] 
4551			} ] 
4652		} , 
4753		{ 
4854			code : header  +  'test\t.only(t => { t.pass(); });' , 
49- 			output : header  +  'test\t(t => { t.pass(); });' , 
5055			errors : [ { 
5156				message, 
5257				type : 'Identifier' , 
5358				line : 2 , 
54- 				column : 7 
59+ 				column : 7 , 
60+ 				suggestions : [ { 
61+ 					desc : 'Remove the `.only`' , 
62+ 					output : header  +  'test\t(t => { t.pass(); });' 
63+ 				} ] 
5564			} ] 
5665		} , 
5766		{ 
5867			code : header  +  'test  .only(t => { t.pass(); });' , 
59- 			output : header  +  'test  (t => { t.pass(); });' , 
6068			errors : [ { 
6169				message, 
6270				type : 'Identifier' , 
6371				line : 2 , 
64- 				column : 8 
72+ 				column : 8 , 
73+ 				suggestions : [ { 
74+ 					desc : 'Remove the `.only`' , 
75+ 					output : header  +  'test  (t => { t.pass(); });' 
76+ 				} ] 
6577			} ] 
6678		} , 
6779		{ 
6880			code : header  +  'test.\n\tonly(t => { t.pass(); });' , 
69- 			output : header  +  'test\n\t(t => { t.pass(); });' , 
7081			errors : [ { 
7182				message, 
7283				type : 'Identifier' , 
7384				line : 3 , 
74- 				column : 2 
85+ 				column : 2 , 
86+ 				suggestions : [ { 
87+ 					desc : 'Remove the `.only`' , 
88+ 					output : header  +  'test\n\t(t => { t.pass(); });' 
89+ 				} ] 
7590			} ] 
7691		} , 
7792		{ 
7893			code : header  +  'test.\n  only(t => { t.pass(); });' , 
79- 			output : header  +  'test\n  (t => { t.pass(); });' , 
8094			errors : [ { 
8195				message, 
8296				type : 'Identifier' , 
8397				line : 3 , 
84- 				column : 3 
98+ 				column : 3 , 
99+ 				suggestions : [ { 
100+ 					desc : 'Remove the `.only`' , 
101+ 					output : header  +  'test\n  (t => { t.pass(); });' 
102+ 				} ] 
85103			} ] 
86104		} , 
87105		{ 
88106			code : header  +  'test.only(t => { t.pass(); });' , 
89- 			output : header  +  'test(t => { t.pass(); });' , 
90107			errors : [ { 
91108				message, 
92109				type : 'Identifier' , 
93110				line : 2 , 
94- 				column : 6 
111+ 				column : 6 , 
112+ 				suggestions : [ { 
113+ 					desc : 'Remove the `.only`' , 
114+ 					output : header  +  'test(t => { t.pass(); });' 
115+ 				} ] 
95116			} ] 
96117		} , 
97118		{ 
98119			code : header  +  'test.cb.only(t => { t.pass(); t.end(); });' , 
99- 			output : header  +  'test.cb(t => { t.pass(); t.end(); });' , 
100120			errors : [ { 
101121				message, 
102122				type : 'Identifier' , 
103123				line : 2 , 
104- 				column : 9 
124+ 				column : 9 , 
125+ 				suggestions : [ { 
126+ 					desc : 'Remove the `.only`' , 
127+ 					output : header  +  'test.cb(t => { t.pass(); t.end(); });' 
128+ 				} ] 
105129			} ] 
106130		} , 
107131		{ 
108132			code : header  +  'test.only.cb(t => { t.pass(); t.end(); });' , 
109- 			output : header  +  'test.cb(t => { t.pass(); t.end(); });' , 
110133			errors : [ { 
111134				message, 
112135				type : 'Identifier' , 
113136				line : 2 , 
114- 				column : 6 
137+ 				column : 6 , 
138+ 				suggestions : [ { 
139+ 					desc : 'Remove the `.only`' , 
140+ 					output : header  +  'test.cb(t => { t.pass(); t.end(); });' 
141+ 				} ] 
115142			} ] 
116143		} 
117144	] 
0 commit comments