Skip to content

Commit 803a485

Browse files
author
Gayathri G
committed
add testcase
1 parent 55564fc commit 803a485

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/rules/__tests__/lowercase-name.test.ts

+23-1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,28 @@ ruleTester.run('uppercase-name with ignore=top', rule, {
256256
code: 'it(`Foo`, function () {})',
257257
options: [{ ignore: [TopCase.top] }],
258258
},
259+
{
260+
code: `describe('MyFirstClass', () => {});
261+
describe('MySecondClass', () => {});`,
262+
options: [{ ignore: [TopCase.top] }],
263+
},
264+
],
265+
invalid: [
266+
{
267+
code:`describe("Xyz abc"){
268+
test("Cde"){}
269+
}`,
270+
output: `describe("Xyz abc"){
271+
test("cde"){}
272+
}`,
273+
errors: [
274+
{
275+
messageId: 'unexpectedLowercase',
276+
data: { method: DescribeAlias.describe },
277+
column: 1,
278+
line: 1,
279+
},
280+
],
281+
}
259282
],
260-
invalid: [],
261283
});

0 commit comments

Comments
 (0)