diff --git a/packages/~/app/ui/package.json b/packages/~/app/ui/package.json index d3e42110..e7b3a26b 100644 --- a/packages/~/app/ui/package.json +++ b/packages/~/app/ui/package.json @@ -37,6 +37,9 @@ "./table": { "default": "./src/table/index.ts" }, + "./testing": { + "default": "./src/testing/index.ts" + }, "./visually_hidden": { "default": "./src/visually_hidden/index.ts" }, diff --git a/packages/~/organizations/ui/src/info/About.test.tsx b/packages/~/organizations/ui/src/info/About.test.tsx index c6f1a82d..84055ef1 100644 --- a/packages/~/organizations/ui/src/info/About.test.tsx +++ b/packages/~/organizations/ui/src/info/About.test.tsx @@ -1,44 +1,38 @@ // +import { renderHTML } from "@~/app.ui/testing"; import { expect, test } from "bun:test"; -import { Hono } from "hono"; -import { jsxRenderer } from "hono/jsx-renderer"; import { About } from "./About"; test("render about section", async () => { - const response = await new Hono() - .get("/", jsxRenderer(), ({ render }) => - render( - , - ), - ) - .request("/"); - expect(response.status).toBe(200); - // expect( - // await format(await response.text(), { parser: "html" }), - // ).toMatchSnapshot(); + expect( + await renderHTML( + , + ), + ).toMatchSnapshot(); }); diff --git a/packages/~/organizations/ui/src/info/__snapshots__/About.test.tsx.snap b/packages/~/organizations/ui/src/info/__snapshots__/About.test.tsx.snap index 04c64e76..a8c75c7d 100644 --- a/packages/~/organizations/ui/src/info/__snapshots__/About.test.tsx.snap +++ b/packages/~/organizations/ui/src/info/__snapshots__/About.test.tsx.snap @@ -1,8 +1,7 @@ // Bun Snapshot v1, https://goo.gl/fbAQLP exports[`render about section 1`] = ` -" -
+"
  • Creation de l'organisation :