import { cleanup, render, screen, } from "@testing-library/react"; import assert from "node:assert"; import { afterEach, describe, test, } from "node:test"; import { Section } from "./index"; describe("Section", () => { afterEach(() => { cleanup(); }); test("renders section with header, content and footer", () => { const { container } = render(
Header} slotFooter={Footer} >

Content

); assert.notStrictEqual(container.querySelector("section#main-section"), null); assert.notStrictEqual(screen.queryByText("Header"), null); assert.notStrictEqual(screen.queryByText("Content"), null); assert.notStrictEqual(screen.queryByText("Footer"), null); }); });