Skip to content

Commit

Permalink
test helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
nandorojo committed Jan 8, 2024
1 parent 40b5f05 commit a5225ec
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions test/multiple_selected_dates.test.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
import React from "react";
import DatePicker from "../src";
import { mount } from "enzyme";
import TestUtils from "react-dom/test-utils";

function getSelectedDaysNode(datePicker) {
return datePicker.calendar.componentNode.querySelectorAll(
'.react-datepicker__day[tabindex="0"]',
);
}

function findSelectedDays(datePicker, targetDate) {
const days = TestUtils.scryRenderedComponentsWithType(datePicker, Day);
return days.filter(
(d) =>
utils.formatDate(d.props.day, "yyyy-MM-dd") ===
utils.formatDate(targetDate, "yyyy-MM-dd"),
);
}

describe("Multiple Dates Selected", function () {
function getDatePicker(extraProps) {
return TestUtils.renderIntoDocument(
Expand Down

0 comments on commit a5225ec

Please sign in to comment.