diff --git a/package-lock.json b/package-lock.json index 1088060..8af61f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -206,13 +206,13 @@ } }, "@funkia/hareactive": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@funkia/hareactive/-/hareactive-0.3.2.tgz", - "integrity": "sha512-kdrT7oBC+inAy+hRky3cxVJ5rroLxWdGSv4buffNmVyDF8rIdjdweTs8z87jnItvsR63f63cyLBlXV7Q7Wr9Kg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@funkia/hareactive/-/hareactive-0.3.3.tgz", + "integrity": "sha512-iTo6UOb3ztFoCScSKPbh7WiQrg0o48lur5bYX4dPQ44lesMlG3MdqygEoEizhX0Jnbj0/P+itKzWGhzt3scpPg==", "dev": true, "requires": { "@funkia/io": "0.0.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" } }, "@funkia/io": { diff --git a/package.json b/package.json index 8ecbdbf..f440e0e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "homepage": "https://github.com/funkia/turbine#readme", "devDependencies": { - "@funkia/hareactive": "^0.3.2", + "@funkia/hareactive": "^0.3.3", "@types/chai": "^4.1.7", "@types/chai-dom": "0.0.7", "@types/jest": "^24.0.15", diff --git a/test/component.spec.ts b/test/component.spec.ts index fd78255..d52741f 100644 --- a/test/component.spec.ts +++ b/test/component.spec.ts @@ -234,20 +234,21 @@ describe("component specs", () => { const { available, output } = testComponent(comp); assert.deepEqual(Object.keys(output), []); assert.deepEqual(Object.keys(available), ["foo"]); - // expect(H.at(b!)).to.equal(2); + expect(H.at(b!)).to.equal(2); }); it("works with selected fgo and looped behavior", () => { const comp = loop( fgo(function*({ name }: Looped): IterableIterator> { yield div(name); - ({ value: name } = yield input({ props: { value: "Foo" } })); + ({ name } = yield input({ props: { value: "Foo" } }).output({ + name: "value" + })); return { name }; }) ); const { dom } = testComponent(comp); expect(dom).to.have.length(2); - // FIXME: Seems to be a bug in Hareactive - // expect(dom.firstChild).to.have.text("Foo"); + expect(dom.firstChild).to.have.text("Foo"); }); it("can be told to destroy", () => { let toplevel = false; @@ -258,14 +259,15 @@ describe("component specs", () => { }: Looped): IterableIterator> { yield div(name); destroyed.subscribe((b) => (toplevel = b)); - ({ value: name } = yield input({ props: { value: "Foo" } })); + ({ name } = yield input({ props: { value: "Foo" } }).output({ + name: "value" + })); return { name }; }) ); const { dom, destroy } = testComponent(comp); expect(dom).to.have.length(2); - // FIXME: Seems to be a bug in Hareactive - // expect(dom.firstChild).to.have.text("Foo"); + expect(dom.firstChild).to.have.text("Foo"); destroy(true); expect(dom).to.have.length(0); expect(toplevel).to.equal(true);