From af559e9a6c0e91b6363f8cade5f190bf8001837d Mon Sep 17 00:00:00 2001 From: Sergey Vinogradov Date: Mon, 23 Dec 2024 13:24:17 +0400 Subject: [PATCH] fix: await proper element in resize mixin tests --- packages/component-base/test/resize-mixin.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/component-base/test/resize-mixin.test.js b/packages/component-base/test/resize-mixin.test.js index 34c11ffa2d..b964848195 100644 --- a/packages/component-base/test/resize-mixin.test.js +++ b/packages/component-base/test/resize-mixin.test.js @@ -62,13 +62,13 @@ describe('resize-mixin', () => { beforeEach(async () => { parent.appendChild(element); // Wait for the initial resize. - await nextResize(element); + await nextResize(parent); }); it('should notify parent element resize', async () => { const spy = sinon.spy(element, '_onResize'); parent.style.width = '100px'; - await nextResize(element); + await nextResize(parent); expect(spy.calledOnce).to.be.true; }); @@ -109,13 +109,13 @@ describe('resize-mixin', () => { parent.attachShadow({ mode: 'open' }); parent.shadowRoot.appendChild(element); // Wait for the initial resize. - await nextResize(element); + await nextResize(parent); }); it('should notify shadow host resize', async () => { const spy = sinon.spy(element, '_onResize'); parent.style.width = '100px'; - await nextResize(element); + await nextResize(parent); expect(spy.calledOnce).to.be.true; }); });