Skip to content

Commit

Permalink
Use toHaveCount instead of toBe
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 5, 2024
1 parent cc803bc commit 2fe53a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/specs/editor/various/block-visibility.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ test.describe( 'Block Visibility', () => {
} )
.getByRole( 'group' );

expect(
await blockCategories.count(),
await expect(
blockCategories,
'Only one category should be visible'
).toBe( 1 );
).toHaveCount( 1 );

await expect(
blockCategories.first().getByRole( 'checkbox', { name: 'Text' } ),
Expand All @@ -194,10 +194,10 @@ test.describe( 'Block Visibility', () => {
.first()
.getByRole( 'list' );

expect(
await textCategoryBlocksList.getByRole( 'checkbox' ).count(),
await expect(
textCategoryBlocksList.getByRole( 'checkbox' ),
'Only one block should be visible'
).toBe( 1 );
).toHaveCount( 1 );

await expect(
textCategoryBlocksList.getByRole( 'checkbox', { name: 'Verse' } ),
Expand Down

0 comments on commit 2fe53a6

Please sign in to comment.