UNPKG

@crossed/primitive

Version:

A universal & performant styling library for React Native, Next.js & React

17 lines (16 loc) 613 B
import { jsx } from "react/jsx-runtime"; import "@testing-library/jest-dom"; import { render, screen } from "@crossed/test"; import { createListItem } from "../ListItem"; import { forwardRef } from "react"; const Comp = forwardRef((p, ref) => /* @__PURE__ */ jsx("div", { ...p, ref })); const NewComp = createListItem(Comp); describe("createListItem", () => { test("init", async () => { const child = "Pass child"; render(/* @__PURE__ */ jsx(NewComp, { children: child })); await screen.findByText(child); await screen.findByRole("listitem"); }); }); //# sourceMappingURL=ListItem.spec.js.map