@@ -26,92 +26,119 @@ ruleTester.run('no-only-test', rule, {
26
26
invalid : [
27
27
{
28
28
code : header + 'test\n\t.only(t => { t.pass(); });' ,
29
- output : header + 'test\n\t(t => { t.pass(); });' ,
30
29
errors : [ {
31
30
message,
32
31
type : 'Identifier' ,
33
32
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
+ } ]
35
38
} ]
36
39
} ,
37
40
{
38
41
code : header + 'test\n .only(t => { t.pass(); });' ,
39
- output : header + 'test\n (t => { t.pass(); });' ,
40
42
errors : [ {
41
43
message,
42
44
type : 'Identifier' ,
43
45
line : 3 ,
44
- column : 4
46
+ column : 4 ,
47
+ suggestions : [ {
48
+ desc : 'Remove the `.only`' ,
49
+ output : header + 'test\n (t => { t.pass(); });'
50
+ } ]
45
51
} ]
46
52
} ,
47
53
{
48
54
code : header + 'test\t.only(t => { t.pass(); });' ,
49
- output : header + 'test\t(t => { t.pass(); });' ,
50
55
errors : [ {
51
56
message,
52
57
type : 'Identifier' ,
53
58
line : 2 ,
54
- column : 7
59
+ column : 7 ,
60
+ suggestions : [ {
61
+ desc : 'Remove the `.only`' ,
62
+ output : header + 'test\t(t => { t.pass(); });'
63
+ } ]
55
64
} ]
56
65
} ,
57
66
{
58
67
code : header + 'test .only(t => { t.pass(); });' ,
59
- output : header + 'test (t => { t.pass(); });' ,
60
68
errors : [ {
61
69
message,
62
70
type : 'Identifier' ,
63
71
line : 2 ,
64
- column : 8
72
+ column : 8 ,
73
+ suggestions : [ {
74
+ desc : 'Remove the `.only`' ,
75
+ output : header + 'test (t => { t.pass(); });'
76
+ } ]
65
77
} ]
66
78
} ,
67
79
{
68
80
code : header + 'test.\n\tonly(t => { t.pass(); });' ,
69
- output : header + 'test\n\t(t => { t.pass(); });' ,
70
81
errors : [ {
71
82
message,
72
83
type : 'Identifier' ,
73
84
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
+ } ]
75
90
} ]
76
91
} ,
77
92
{
78
93
code : header + 'test.\n only(t => { t.pass(); });' ,
79
- output : header + 'test\n (t => { t.pass(); });' ,
80
94
errors : [ {
81
95
message,
82
96
type : 'Identifier' ,
83
97
line : 3 ,
84
- column : 3
98
+ column : 3 ,
99
+ suggestions : [ {
100
+ desc : 'Remove the `.only`' ,
101
+ output : header + 'test\n (t => { t.pass(); });'
102
+ } ]
85
103
} ]
86
104
} ,
87
105
{
88
106
code : header + 'test.only(t => { t.pass(); });' ,
89
- output : header + 'test(t => { t.pass(); });' ,
90
107
errors : [ {
91
108
message,
92
109
type : 'Identifier' ,
93
110
line : 2 ,
94
- column : 6
111
+ column : 6 ,
112
+ suggestions : [ {
113
+ desc : 'Remove the `.only`' ,
114
+ output : header + 'test(t => { t.pass(); });'
115
+ } ]
95
116
} ]
96
117
} ,
97
118
{
98
119
code : header + 'test.cb.only(t => { t.pass(); t.end(); });' ,
99
- output : header + 'test.cb(t => { t.pass(); t.end(); });' ,
100
120
errors : [ {
101
121
message,
102
122
type : 'Identifier' ,
103
123
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
+ } ]
105
129
} ]
106
130
} ,
107
131
{
108
132
code : header + 'test.only.cb(t => { t.pass(); t.end(); });' ,
109
- output : header + 'test.cb(t => { t.pass(); t.end(); });' ,
110
133
errors : [ {
111
134
message,
112
135
type : 'Identifier' ,
113
136
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
+ } ]
115
142
} ]
116
143
}
117
144
]
0 commit comments