@@ -174,7 +174,7 @@ ruleTester.run('extensions', rule, {
174
174
175
175
invalid : [
176
176
tInvalid ( {
177
- name : 'extensions should autofix by default' ,
177
+ name : 'extensions should provide suggestions by default' ,
178
178
code : 'import a from "./foo.js"' ,
179
179
options : [ 'never' ] ,
180
180
errors : [
@@ -183,14 +183,24 @@ ruleTester.run('extensions', rule, {
183
183
data : { extension : 'js' , importPath : './foo.js' } ,
184
184
line : 1 ,
185
185
column : 15 ,
186
+ suggestions : [
187
+ {
188
+ messageId : 'removeUnexpected' ,
189
+ data : {
190
+ extension : 'js' ,
191
+ importPath : './foo.js' ,
192
+ fixedImportPath : './foo' ,
193
+ } ,
194
+ output : 'import a from "./foo"' ,
195
+ } ,
196
+ ] ,
186
197
} ,
187
198
] ,
188
- output : 'import a from "./foo"' ,
189
199
} ) ,
190
200
tInvalid ( {
191
201
name : 'extensions should autofix when fix is set to true' ,
192
202
code : 'import a from "./foo.js"' ,
193
- options : [ 'never' , { fix : true } ] ,
203
+ options : [ 'never' , { fix : true } ] ,
194
204
errors : [
195
205
{
196
206
messageId : 'unexpected' ,
@@ -204,7 +214,7 @@ ruleTester.run('extensions', rule, {
204
214
tInvalid ( {
205
215
name : 'extensions should autofix when fix is set to true and a pattern object is provided' ,
206
216
code : 'import a from "./foo.js"' ,
207
- options : [ 'never' , { fix : true , pattern : { } } ] ,
217
+ options : [ 'never' , { fix : true , pattern : { } } ] ,
208
218
errors : [
209
219
{
210
220
messageId : 'unexpected' ,
@@ -218,7 +228,7 @@ ruleTester.run('extensions', rule, {
218
228
tInvalid ( {
219
229
name : 'extensions should not autofix when fix is set to false' ,
220
230
code : 'import a from "./foo.js"' ,
221
- options : [ 'never' , { fix : false } ] ,
231
+ options : [ 'never' , { fix : false } ] ,
222
232
errors : [
223
233
{
224
234
messageId : 'unexpected' ,
0 commit comments