var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
import { jsx } from "react/jsx-runtime";
import React from "react";
import { render, screen } from "@testing-library/react";
import ThemeProvider from "../../../Theme";
import { ListItem } from "./List";
const text = "2.900 gyms and studios";
function setup(props) {
  render(
    /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(ListItem, __spreadValues({ text }, props)) })
  );
}
describe("<ListItem />", () => {
  it("should display text truncated", () => {
    setup();
    expect(screen.getByText(text)).toMatchSnapshot();
  });
  it("should not display text truncated when truncate prop is false", () => {
    setup({ truncate: false });
    expect(screen.getByText(text)).toMatchSnapshot();
  });
  it("should display children element", () => {
    setup({ children: /* @__PURE__ */ jsx("ul", {}) });
    expect(screen.getByRole("list")).toBeInTheDocument();
  });
});
