Skip to content

Commit 1edb6ae

Browse files
test: add coverage for outsideClickIgnoreClass falsy fallback
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f1c6da0 commit 1edb6ae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/datepicker_test.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,15 @@ describe("DatePicker", () => {
720720
expect(input?.classList.contains(OUTSIDE_CLICK_IGNORE_CLASS)).toBe(true);
721721
});
722722

723+
it("should apply the default outsideClickIgnoreClass when prop is falsy", () => {
724+
const { container } = render(
725+
<DatePicker outsideClickIgnoreClass={null as any} />,
726+
);
727+
const input = safeQuerySelector<HTMLInputElement>(container, "input");
728+
fireEvent.focus(input);
729+
expect(input?.classList.contains(OUTSIDE_CLICK_IGNORE_CLASS)).toBe(true);
730+
});
731+
723732
it("should toggle the open status of calendar on click of the icon when toggleCalendarOnIconClick is set to true", () => {
724733
const { container } = render(
725734
<DatePicker

0 commit comments

Comments
 (0)