From 3be62f04dbfc157f1c208e9ff129624a4755f737 Mon Sep 17 00:00:00 2001 From: Ryan Gossiaux Date: Sat, 10 Jun 2023 20:07:59 -0700 Subject: [PATCH] Move to in Render.svelte I don't know why this causes more whitespace in these snapshot tests but I'm not going to worry about it right now. --- .../description/description.test.ts | 4 + src/lib/components/label/label.test.ts | 7 + src/lib/utils/Render.svelte | 430 +----------------- 3 files changed, 15 insertions(+), 426 deletions(-) diff --git a/src/lib/components/description/description.test.ts b/src/lib/components/description/description.test.ts index 34b1c38..7aaa6d4 100644 --- a/src/lib/components/description/description.test.ts +++ b/src/lib/components/description/description.test.ts @@ -58,6 +58,7 @@ it("should be possible to use a DescriptionProvider and a single Description, an

+ Contents @@ -87,6 +88,7 @@ it("should be possible to use a DescriptionProvider and multiple Description com

+ Contents @@ -99,6 +101,7 @@ it("should be possible to use a DescriptionProvider and multiple Description com

+ `); }); @@ -124,6 +127,7 @@ it("should be possible to use a DescriptionProvider with slot props", async () =

+ Contents diff --git a/src/lib/components/label/label.test.ts b/src/lib/components/label/label.test.ts index 466621f..8ba5022 100644 --- a/src/lib/components/label/label.test.ts +++ b/src/lib/components/label/label.test.ts @@ -64,6 +64,7 @@ it("should be possible to use a LabelProvider and a single Label, and have them + Contents @@ -93,6 +94,7 @@ it("should be possible to use a LabelProvider and multiple Label components, and + Contents @@ -105,6 +107,7 @@ it("should be possible to use a LabelProvider and multiple Label components, and + `); }); @@ -129,6 +132,7 @@ it("should be possible to render a Label with an `as` prop", async () => {

+ Contents @@ -159,6 +163,7 @@ it("should be possible to change the props of a Label", async () => { + Contents @@ -181,6 +186,7 @@ it("should be possible to change the props of a Label", async () => { + Contents @@ -209,6 +215,7 @@ it("should be possible to use a LabelProvider with slot props", async () => { + Contents diff --git a/src/lib/utils/Render.svelte b/src/lib/utils/Render.svelte index b6326b2..9825c81 100644 --- a/src/lib/utils/Render.svelte +++ b/src/lib/utils/Render.svelte @@ -74,14 +74,9 @@ {#if show} - - {#if as === "a"} - - - {:else if as === "address"} - - {:else if as === "article"} - - {:else if as === "aside"} - - {:else if as === "b"} - - {:else if as === "bdi"} - - {:else if as === "bdo"} - - {:else if as === "blockquote"} - - {:else if as === "button"} - - {:else if as === "cite"} - - {:else if as === "code"} - - {:else if as === "data"} - - {:else if as === "datalist"} - - {:else if as === "dd"} - - {:else if as === "dl"} - - {:else if as === "dt"} - - {:else if as === "div"} - - {:else if as === "em"} - - {:else if as === "footer"} -
- -
- {:else if as === "form"} -
{:else}