import { render } from "../../../../config/test-utils";
import * as React from "react";
import Button from "../";

describe("core/Primitive/Button", () => {
  describe("<Button />", () => {
    test("renders correctly", () => {
      const container = render(<Button>this is button</Button>);
      const _button = container.getByText("this is button");
      expect(_button).toBeTruthy();
    });

    test("not render any text while loading", () => {
      const container = render(<Button isLoading>this is button</Button>);
      const _button = container.queryByText("this is button");
      expect(_button).toBeNull();
    });
  });
});
