@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
28 lines (27 loc) • 883 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { render, screen } from "@crossed/test";
import { FloatingContent } from "../Content";
import { inlineStyle } from "@crossed/styled";
import { FloatingProvider } from "../context";
describe("Floating.Content", () => {
const mount = (style) => {
expect(FloatingContent.displayName).toEqual("Floating.Content");
render(
/* @__PURE__ */ jsx(FloatingProvider, { ...{ open: true }, children: /* @__PURE__ */ jsx(FloatingContent, { testID: "Animated", style }) })
);
expect(screen.getByTestId("Animated")).toBeTruthy();
};
test("no style", async () => {
mount();
});
test("array style", async () => {
mount([]);
});
test("object style", async () => {
mount({});
});
test("crossed style", async () => {
mount(inlineStyle(() => ({})));
});
});
//# sourceMappingURL=Content.spec.js.map