Precise DOM morphing
morphing typescript dom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add more nanomorph test cases

+24
+24
test/something.test.js
··· 438 438 expect(a.disabled).to.equal(true); 439 439 }); 440 440 }); 441 + 442 + describe('indeterminate', () => { 443 + it("if new tree has no indeterminate and old tree has indeterminate mutated to true, set value from new tree", async () => { 444 + const a = await fixture(html`<input type="checkbox" />`); 445 + const b = await fixture(html`<input type="checkbox" />`); 446 + b.indeterminate = true; 447 + 448 + morph(a, b); 449 + 450 + expect(a.outerHTML).to.equal(b.outerHTML); 451 + expect(a.indeterminate).to.equal(true); 452 + }); 453 + 454 + it("if new tree has no indeterminate and old tree has indeterminate mutated to false, set value from new tree", async () => { 455 + const a = await fixture(html`<input type="checkbox" />`); 456 + const b = await fixture(html`<input type="checkbox" />`); 457 + b.indeterminate = false; 458 + 459 + morph(a, b); 460 + 461 + expect(a.outerHTML).to.equal(b.outerHTML); 462 + expect(a.indeterminate).to.equal(false); 463 + }); 464 + }) 441 465 }); 442 466 });