Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Fixes #307
  • Loading branch information
mskelton committed Sep 9, 2024
1 parent e6f92b0 commit 5c20c52
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rules/prefer-to-have-length.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ runRuleTester('prefer-to-have-length', rule, {
},
},
},
{
code: 'expect((await table.rows.all()).length).toBe(5)',
errors: [
{ column: 41, endColumn: 45, line: 1, messageId: 'useToHaveLength' },
],
output: 'expect((await table.rows.all())).toHaveLength(5)',
},
],
valid: [
'expect(files).toHaveLength(1)',
Expand Down

0 comments on commit 5c20c52

Please sign in to comment.