import React from "react"
import { render, screen } from "@testing-library/react"
import Textarea from ".."

const ExampleTextarea = () => {
  return (
    <Textarea
      placeholder="Enter your username"
      label="Username"
      id="username"
    />
  )
}

describe("Textarea", () => {
  test("component renders", () => {
    render(<ExampleTextarea />)

    const textarea = screen.getByLabelText("Username", { selector: "textarea" })
    expect(textarea).toBeInTheDocument()
  })
})
