From 3ad4a6228990d0ee8adc2d982667d74ff24089ee Mon Sep 17 00:00:00 2001 From: Keisuke Umeno <9renpoto@gmail.com> Date: Wed, 18 Sep 2024 07:52:35 +0900 Subject: [PATCH 1/2] refactor: filter 404 response --- __tests__/Footer.test.tsx | 8 +- __tests__/Header.test.tsx | 8 +- __tests__/SEO.test.tsx | 4 +- __tests__/index.test.tsx | 4 +- __tests__/islands/SearchButton.test.tsx | 18 ++-- components/Bio.tsx | 11 +- components/Footer.tsx | 18 ++-- components/Header.tsx | 6 +- components/SEO.tsx | 7 +- deno.json | 10 +- fresh.config.ts | 2 +- fresh.gen.ts | 4 +- islands/SearchButton.tsx | 27 +++-- main.ts | 2 +- routes/_404.tsx | 4 +- routes/_app.tsx | 2 +- routes/_middleware.ts | 137 ++++++++++++------------ routes/about/index.tsx | 8 +- routes/entry/[...all].tsx | 8 +- routes/healthz.tsx | 10 +- routes/index.tsx | 12 +-- routes/rss.xml.ts | 8 +- tailwind.config.ts | 4 +- utils/posts.ts | 4 +- 24 files changed, 155 insertions(+), 171 deletions(-) diff --git a/__tests__/Footer.test.tsx b/__tests__/Footer.test.tsx index e8bd761..09a62b0 100644 --- a/__tests__/Footer.test.tsx +++ b/__tests__/Footer.test.tsx @@ -1,16 +1,14 @@ -import { afterEach, beforeAll, describe, it } from "@std/testing/bdd"; -import { assertExists } from "@std/testing/asserts"; import { cleanup, render, setup } from "$fresh-testing-library/components.ts"; import { Footer } from "@/components/Footer.tsx"; +import { assertExists } from "@std/testing/asserts"; +import { afterEach, beforeAll, describe, it } from "@std/testing/bdd"; describe("Footer", () => { beforeAll(setup); afterEach(cleanup); it("should exists.", () => { - const { container } = render( -