diff --git a/.vscode/import_map.json b/.vscode/import_map.json index 1cb407c1..8952e50a 100644 --- a/.vscode/import_map.json +++ b/.vscode/import_map.json @@ -17,8 +17,6 @@ "$std/": "https://deno.land/std@0.216.0/", "$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts", "$marked-mangle": "https://esm.sh/marked-mangle@1.0.1", - "$fresh-testing-library": "https://deno.land/x/fresh_testing_library@0.11.1/mod.ts", - "$fresh-testing-library/": "https://deno.land/x/fresh_testing_library@0.11.1/", "tailwindcss": "npm:tailwindcss@3.4.1", "tailwindcss/": "npm:/tailwindcss@3.4.1/", "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js" diff --git a/tests/www/components/gallery/Background.test.tsx b/tests/www/components/gallery/Background.test.tsx deleted file mode 100644 index a0c9e884..00000000 --- a/tests/www/components/gallery/Background.test.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { assertEquals } from "$std/testing/asserts.ts"; -import { cleanup, render, setup } from "$fresh-testing-library"; -import { afterEach, beforeAll, describe, it } from "$std/testing/bdd.ts"; -import Background from "$fresh/www/components/gallery/Background.tsx"; - -describe("components/gallery/Background.tsx", () => { - beforeAll(setup); - afterEach(cleanup); - - it("should display background image", () => { - const { getByTitle } = render(); - const bg = getByTitle("background"); - const style = bg.getAttribute("style"); - assertEquals(style, "background-image: url(/gallery/grid.svg);"); - }); -}); diff --git a/tests/www/components/gallery/Button.test.tsx b/tests/www/components/gallery/Button.test.tsx deleted file mode 100644 index 537db63f..00000000 --- a/tests/www/components/gallery/Button.test.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { assertEquals, assertExists } from "$std/testing/asserts.ts"; -import { cleanup, render, setup } from "$fresh-testing-library"; -import { afterEach, beforeAll, describe, it } from "$std/testing/bdd.ts"; -import Button from "../../../../www/components/gallery/Button.tsx"; - -describe("components/gallery/LinkButton.tsx", () => { - beforeAll(setup); - afterEach(cleanup); - - it("should show button", () => { - const { getByRole } = render( - - ); - })} - - ); - - return ( -
- - - {SLIDE_DATA.map((item, idx) => ( - - ))} - {SHOW_NAVIGATION && - } - -
- ); -}; - -export default Carousel; diff --git a/www/components/gallery/CodeBox.tsx b/www/components/gallery/CodeBox.tsx deleted file mode 100644 index 23d7d770..00000000 --- a/www/components/gallery/CodeBox.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useSignal } from "@preact/signals"; - -import Prism from "https://esm.sh/prismjs@1.29.0"; -import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check"; - -interface CodeBoxProps { - code: string; -} - -export default function CodeBox(props: CodeBoxProps) { - const highlighted = Prism.highlight( - props.code, - Prism.languages.typescript, - "typescript", - ); - const onCopy = () => { - navigator.clipboard.writeText(props.code); - copied.value = true; - }; - - const copied = useSignal(false); - return ( -
-
- - Code - -
-
-            
-          
- -
-
-
- ); -} diff --git a/www/components/gallery/ColoredButton.tsx b/www/components/gallery/ColoredButton.tsx deleted file mode 100644 index 2b7bc527..00000000 --- a/www/components/gallery/ColoredButton.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { JSX } from "preact"; -import { IS_BROWSER } from "$fresh/runtime.ts"; - -export default function ColoredButton( - props: JSX.HTMLAttributes, -) { - return ( - - - - -
- - Click me - -
- -
- - -
- -
- - -
- -
-
-
- -
-
-
- -
- -
- -
- -
- -
- -
- - ); -}