Skip to content

Commit

Permalink
fix: Chip 테스트코드 prop 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Aug 21, 2024
1 parent 98b72a3 commit 0ccac05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/wow-ui/src/components/Chip/Chip.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Chip from "@/components/Chip";
describe("Chip rendering Test", () => {
let renderChip: RenderResult;
beforeEach(() => {
renderChip = render(<Chip as="div" label="Chip" />);
renderChip = render(<Chip asProp="div" label="Chip" />);
});

it("should render Chip", () => {
Expand All @@ -24,7 +24,7 @@ describe("Chip rendering Test", () => {
describe("Chip toggle Test", () => {
let renderChip: RenderResult;
beforeEach(() => {
renderChip = render(<Chip as="button" clickable={true} label="Chip" />);
renderChip = render(<Chip asProp="button" clickable={true} label="Chip" />);
});

it("should toggle state when onClick event is fired", async () => {
Expand Down Expand Up @@ -94,7 +94,7 @@ describe("external control and events", () => {
});

it("should fire external onKeyDown event", async () => {
renderChip = render(<Chip clickable as="button" label="Chip" />);
renderChip = render(<Chip clickable asProp="button" label="Chip" />);
const user = userEvent.setup();
const chipComponent = renderChip.getByRole("checkbox");
const onKeyDownHandler = jest.fn();
Expand All @@ -112,7 +112,7 @@ describe("external control and events", () => {
const handleChange = () => {
checked = !checked;
};
const rendered = render(<Chip clickable as="button" label="Chip" />);
const rendered = render(<Chip clickable asProp="button" label="Chip" />);
const chipComponent = rendered.getByRole("checkbox");
chipComponent.onchange = handleChange;

Expand Down

0 comments on commit 0ccac05

Please sign in to comment.