@@ -58,6 +58,8 @@ final multiChangeFixPlugin = createPluginSource([
58
58
),
59
59
]);
60
60
61
+ const ignoreId = '<<ignore>>' ;
62
+
61
63
void main () {
62
64
test ('Can emit fixes' , () async {
63
65
final plugin = createPlugin (
@@ -89,11 +91,7 @@ void fn2() {}
89
91
[await fixes, await fixes2]
90
92
.expand ((e) => e.fixes)
91
93
.expand ((e) => e.fixes)
92
- .where (
93
- (e) =>
94
- e.change.id != 'ignore_for_file' &&
95
- e.change.id != 'ignore_for_line' ,
96
- ),
94
+ .where ((e) => e.change.id != ignoreId),
97
95
sources: ({'**/*' : mainSource}, relativePath: app.path),
98
96
file: Directory .current.file (
99
97
'test' ,
@@ -125,11 +123,7 @@ void fn() {}
125
123
final fixes = await runner.getFixes (mainPath, 6 );
126
124
127
125
expectMatchesGoldenFixes (
128
- fixes.fixes.expand ((e) => e.fixes).where (
129
- (e) =>
130
- e.change.id != 'ignore_for_file' &&
131
- e.change.id != 'ignore_for_line' ,
132
- ),
126
+ fixes.fixes.expand ((e) => e.fixes).where ((e) => e.change.id != ignoreId),
133
127
sources: ({'**/*' : mainSource}, relativePath: app.path),
134
128
file: Directory .current.file (
135
129
'test' ,
@@ -169,11 +163,7 @@ void fn4() {}
169
163
final fixes = await runner.getFixes (mainPath, 6 );
170
164
171
165
expectMatchesGoldenFixes (
172
- fixes.fixes.expand ((e) => e.fixes).where (
173
- (e) =>
174
- e.change.id != 'ignore_for_file' &&
175
- e.change.id != 'ignore_for_line' ,
176
- ),
166
+ fixes.fixes.expand ((e) => e.fixes).where ((e) => e.change.id != ignoreId),
177
167
sources: ({'**/*' : mainSource}, relativePath: app.path),
178
168
file: Directory .current.file (
179
169
'test' ,
@@ -211,11 +201,7 @@ void fn2() {}
211
201
[await fixes, await fixes2]
212
202
.expand ((e) => e.fixes)
213
203
.expand ((e) => e.fixes)
214
- .where (
215
- (e) =>
216
- e.change.id != 'ignore_for_file' &&
217
- e.change.id != 'ignore_for_line' ,
218
- ),
204
+ .where ((e) => e.change.id != ignoreId),
219
205
sources: ({'**/*' : mainSource}, relativePath: app.path),
220
206
file: Directory .current.file (
221
207
'test' ,
@@ -253,11 +239,7 @@ void fn2() {}
253
239
[await fixes, await fixes2]
254
240
.expand ((e) => e.fixes)
255
241
.expand ((e) => e.fixes)
256
- .where (
257
- (e) =>
258
- e.change.id != 'ignore_for_file' &&
259
- e.change.id != 'ignore_for_line' ,
260
- ),
242
+ .where ((e) => e.change.id != ignoreId),
261
243
sources: ({'**/*' : mainSource}, relativePath: app.path),
262
244
file: Directory .current.file (
263
245
'test' ,
0 commit comments