import { createElement } from "react";
import assert from "node:assert";
import {
  describe,
  test,
} from "node:test";
import { DatePicker } from "./index";

describe("DatePicker", () => {
  test("exports component function", () => {
    assert.strictEqual(typeof DatePicker, "function");
  });

  test("creates react element with base props", () => {
    const element = createElement(DatePicker, {
      name: "date",
      placeholder: "Select date",
    });

    assert.notStrictEqual(element, null);
    assert.strictEqual(element.props.name, "date");
    assert.strictEqual(element.props.placeholder, "Select date");
  });
});
