Skip to content

Commit d5cc13c

Browse files
committed
test: add unit test cases for kebab case
1 parent c272126 commit d5cc13c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/lib/rules/filename-naming-convention.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ ruleTester.run(
277277
filename: 'src/utils/calculate-price.js',
278278
options: [{ '*.js': 'KEBAB_CASE', '*.jsx': 'KEBAB_CASE' }],
279279
},
280+
{
281+
code: "var foo = 'bar';",
282+
filename: 'src/utils/i18n-test.js',
283+
options: [{ '*.js': 'KEBAB_CASE', '*.jsx': 'KEBAB_CASE' }],
284+
},
280285
],
281286

282287
invalid: [
@@ -332,6 +337,19 @@ ruleTester.run(
332337
},
333338
],
334339
},
340+
{
341+
code: "var foo = 'bar';",
342+
filename: 'src/utils/18n-test.js',
343+
options: [{ '*.js': 'KEBAB_CASE', '*.jsx': 'KEBAB_CASE' }],
344+
errors: [
345+
{
346+
message:
347+
'The filename "18n-test.js" does not match the "KEBAB_CASE" style',
348+
column: 1,
349+
line: 1,
350+
},
351+
],
352+
},
335353
],
336354
}
337355
);

0 commit comments

Comments
 (0)