Skip to content

Commit

Permalink
fix src/test/multiple_selected_dates.test.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki0410-dev committed Jun 10, 2024
1 parent 403a5ec commit 9a6769f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const babelTargetList = [
"helper_components/custom_input\\.tsx",
"calendar_test\\.test\\.tsx",
"datepicker_test\\.test\\.tsx",
"multiple_selected_dates\\.test\\.tsx",
];

const tsTargetList = [
Expand All @@ -27,7 +26,7 @@ const tsTargetList = [
"month_test\\.test\\.tsx",
"month_year_dropdown_test\\.test\\.tsx",
"multi_month_test\\.test\\.tsx",
// "multiple_selected_dates\\.test\\.tsx",
"multiple_selected_dates\\.test\\.tsx",
"run_axe\\.tsx",
"show_time_test\\.test\\.tsx",
"test_utils\\.ts",
Expand Down
24 changes: 23 additions & 1 deletion src/test/multiple_selected_dates.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,36 @@ import React from "react";

import DatePicker from "../";

import type { DatePickerProps } from "../index";

describe("Multiple Dates Selected", function () {
function getDatePicker(extraProps) {
function getDatePicker(
extraProps: Partial<
Pick<
DatePickerProps,
| "selectsMultiple"
| "shouldCloseOnSelect"
| "disabledKeyboardNavigation"
| "onSelect"
>
> &
Omit<
DatePickerProps,
| "selectsMultiple"
| "onChange"
| "shouldCloseOnSelect"
| "disabledKeyboardNavigation"
| "onSelect"
| "selectsRange"
>,
) {
return render(
<DatePicker
selectsMultiple
onChange={() => {}}
shouldCloseOnSelect={false}
disabledKeyboardNavigation
onSelect={() => {}}
{...extraProps}
/>,
);
Expand Down

0 comments on commit 9a6769f

Please sign in to comment.