Skip to content

Commit 5c20c52

Browse files
committed
Add test
Fixes #307
1 parent e6f92b0 commit 5c20c52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/rules/prefer-to-have-length.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ runRuleTester('prefer-to-have-length', rule, {
6565
},
6666
},
6767
},
68+
{
69+
code: 'expect((await table.rows.all()).length).toBe(5)',
70+
errors: [
71+
{ column: 41, endColumn: 45, line: 1, messageId: 'useToHaveLength' },
72+
],
73+
output: 'expect((await table.rows.all())).toHaveLength(5)',
74+
},
6875
],
6976
valid: [
7077
'expect(files).toHaveLength(1)',

0 commit comments

Comments
 (0)