Precise DOM morphing
morphing typescript dom

Add idiomorph and morphdom licenses to the tests inspired by them.

+47 -1
+19
test/morphlex-idiomorph.test.ts
··· 1 + /* 2 + * These tests were inspired by idiomorph. 3 + * Here's their license: 4 + * 5 + * Zero-Clause BSD 6 + * ============= 7 + * 8 + * Permission to use, copy, modify, and/or distribute this software for 9 + * any purpose with or without fee is hereby granted. 10 + * 11 + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 13 + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE 14 + * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 15 + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 16 + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 17 + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 + */ 19 + 1 20 import { describe, it, expect, beforeEach, afterEach } from "vitest" 2 21 import { morph, morphInner } from "../src/morphlex" 3 22
+28 -1
test/morphlex-morphdom.test.ts
··· 1 + /* 2 + * These tests were inspired by morphdom. 3 + * Here's their license: 4 + * 5 + * The MIT License (MIT) 6 + * 7 + * Copyright (c) Patrick Steele-Idem <pnidem@gmail.com> (psteeleidem.com) 8 + * 9 + * Permission is hereby granted, free of charge, to any person obtaining a copy 10 + * of this software and associated documentation files (the "Software"), to deal 11 + * in the Software without restriction, including without limitation the rights 12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 + * copies of the Software, and to permit persons to whom the Software is 14 + * furnished to do so, subject to the following conditions: 15 + * 16 + * The above copyright notice and this permission notice shall be included in 17 + * all copies or substantial portions of the Software. 18 + * 19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 + * THE SOFTWARE. 26 + */ 27 + 1 28 import { describe, it, expect, beforeEach, afterEach } from "vitest" 2 29 import { morph } from "../src/morphlex" 3 30 ··· 556 583 const from = parseHTML(fromHTML) 557 584 const to = parseHTML(toHTML) 558 585 559 - const originalElements = Array.from(from.children).map(el => el) 586 + const originalElements = Array.from(from.children).map((el) => el) 560 587 561 588 morph(from, to) 562 589