From d9eca0e5caedc9671f3f101d223b664ea041f222 Mon Sep 17 00:00:00 2001 From: Cristian Necula Date: Mon, 18 Nov 2024 22:42:53 +0000 Subject: [PATCH] test: fix tests --- test/use-autocomplete.test.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/use-autocomplete.test.js b/test/use-autocomplete.test.js index 09f75db9..a1b0cda8 100644 --- a/test/use-autocomplete.test.js +++ b/test/use-autocomplete.test.js @@ -21,8 +21,9 @@ describe('use-autocomplete', () => { .textProperty=${'text'} /> `); + expect(result.current.query).to.equal('It'); - expect(await result.current.items$).to.be.empty; + expect(result.current.items).to.be.empty; }); it('focus', async () => { @@ -38,10 +39,10 @@ describe('use-autocomplete', () => { />`, ); - expect(await result.current.items$).to.be.empty; + expect(result.current.items).to.be.empty; result.current.onFocus({ currentTarget: { matches: () => true } }); await nextFrame(); - expect(await result.current.items$).not.to.be.empty; + expect(result.current.items).not.to.be.empty; expect(onFocus).to.have.been.calledOnceWith(true); }); @@ -128,16 +129,16 @@ describe('use-autocomplete', () => { result = await fixture(html` `); - expect(result.current.query).to.equal('La'); + expect(result.current.query).to.equal('1'); result.current.onFocus({ currentTarget: { matches: () => true } }); await nextFrame(); - expect(await result.current.items$).to.have.lengthOf(2); + expect(result.current.items).to.have.lengthOf(1); }); it('valueProperty', async () => { @@ -158,6 +159,6 @@ describe('use-autocomplete', () => { result.current.onFocus({ currentTarget: { matches: () => true } }); await nextFrame(); - expect(await result.current.items$).to.be.deep.equal(source); + expect(result.current.items).to.be.deep.equal(source); }); });