Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix range calendar broken tests for today #93

Merged
merged 1 commit into from
Oct 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/calendar/__tests__/RangeCalendar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ describe("RangeCalendar", () => {
it("should have proper initial start and end ranges", () => {
const { getByLabelText: label, baseElement } = render(
<RangeCalendarComp
defaultValue={{ start: "2020-10-07", end: "2020-10-30" }}
defaultValue={{ start: "2050-10-07", end: "2050-10-30" }}
/>,
);

const start = baseElement.querySelector("[data-is-selection-start]");
const anyMiddleDate = label("Thursday, October 15, 2020");
// If anyone is reading this code from future
// Note that this will fail again on 15th october 2050.
const anyMiddleDate = label("Saturday, October 15, 2050");
const end = baseElement.querySelector("[data-is-selection-end]");

expect(start).toHaveTextContent("7");
Expand Down