import { describe, test, expect } from "vitest";
import { render } from "@testing-library/react";
import { CustomSelect } from ".";
import { Item } from "../../Collection";
describe("matches snapshots", () => {
const shared = {
label: "Custom dropdown label",
value: "opt1",
onChange: () => {},
};
test("matches default variant", () => {
const result = render(
- Item 1
- Item 2
);
expect(result.asFragment()).toMatchSnapshot();
});
// test("matches multi-select enabled", () => {
// const result = render(
//
// - Item 1
// - Item 2
//
// );
// expect(result.asFragment()).toMatchSnapshot();
// });
// TODO: Searching has not been reimplemented
// test("matches search enabled", () => {
// const result = render(
//
// - Item 1
// - Item 2
//
// );
// expect(result.asFragment()).toMatchSnapshot();
// });
test("matches floating variant", () => {
const result = render(
- Item 1
- Item 2
);
expect(result.asFragment()).toMatchSnapshot();
});
});