import React from "react"
import { describe, test, expect } from "vitest"
import { render } from "../../../tests/render"
import { Markdown } from "../Markdown"
import { TextOverflow } from "./TextOverflow"

describe("<TextOverflow />", () => {
  test("is accessible", async () => {
    const { container } = render(
      <TextOverflow>
        {/* eslint-disable-next-line react/no-children-prop */}
        <Markdown children="" />
      </TextOverflow>,
    )

    expect(container.querySelector(".break-normal")).not.toHaveAttribute(
      "style",
    )
  })
})
