From 925869bf166d358bdb230d16168805872d5f23df Mon Sep 17 00:00:00 2001 From: Sergey Vinogradov Date: Mon, 23 Dec 2024 10:03:11 +0400 Subject: [PATCH] pass element to nextResize --- packages/component-base/test/resize-mixin.test.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/component-base/test/resize-mixin.test.js b/packages/component-base/test/resize-mixin.test.js index 1e0e01dc38..c1e4ff0fc8 100644 --- a/packages/component-base/test/resize-mixin.test.js +++ b/packages/component-base/test/resize-mixin.test.js @@ -33,13 +33,13 @@ describe('resize-mixin', () => { beforeEach(async () => { element = fixtureSync(``); // Wait for the initial resize. - await nextResize(); + await nextResize(element); }); it('should notify resize', async () => { const spy = sinon.spy(element, '_onResize'); element.style.width = '100px'; - await nextResize(); + await nextResize(element); expect(spy.calledOnce).to.be.true; }); @@ -63,14 +63,13 @@ describe('resize-mixin', () => { beforeEach(async () => { parent.appendChild(element); // Wait for the initial resize. - await nextResize(); - // await nextResize(); + await nextResize(element); }); it('should notify parent element resize', async () => { const spy = sinon.spy(element, '_onResize'); parent.style.width = '100px'; - await nextResize(); + await nextResize(element); expect(spy.calledOnce).to.be.true; }); @@ -111,13 +110,13 @@ describe('resize-mixin', () => { parent.attachShadow({ mode: 'open' }); parent.shadowRoot.appendChild(element); // Wait for the initial resize. - await nextResize(); + await nextResize(element); }); it('should notify shadow host resize', async () => { const spy = sinon.spy(element, '_onResize'); parent.style.width = '100px'; - await nextResize(); + await nextResize(element); expect(spy.calledOnce).to.be.true; }); });