Skip to content

Commit

Permalink
test: flush the virtualizer to avoid test flakiness (#5460) (#5480)
Browse files Browse the repository at this point in the history
Co-authored-by: Tomi Virkki <tomivirkki@users.noreply.github.com>
  • Loading branch information
vaadin-bot and tomivirkki authored Feb 7, 2023
1 parent 8045b03 commit f93fe2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/component-base/test/virtualizer-item-height.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ describe('virtualizer - item height', () => {
virtualizer.size = 10000;
});

afterEach(() => {
// Flush the virtualizer to avoid test flakiness
virtualizer.flush();
});

it('should have the initial placeholder height', () => {
const firstItem = elementsContainer.querySelector(`#item-0`);
expect(firstItem.offsetHeight).to.equal(200);
Expand Down

0 comments on commit f93fe2e

Please sign in to comment.