Skip to content

Commit

Permalink
fix: remove errorneous test assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
yin yukun committed Apr 15, 2024
1 parent 7325c37 commit 9af5770
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions test/include_times_test.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,11 @@ describe("TimeComponent", () => {
/>,
);

const allTimeItems = timeComponent.querySelectorAll(
".react-datepicker__time-list-item",
);

// 01:00:30 and 00:00:30 should be correctly visible in the time list
expect(Array.from(allTimeItems).map((node) => node.textContent)).toContain(
"01:00:30",
);
expect(Array.from(allTimeItems).map((node) => node.textContent)).toContain(
"00:00:30",
);

const disabledTimeItems = timeComponent.querySelectorAll(
".react-datepicker__time-list-item--disabled",
);

// 01:00:00 and 00:00:00 should be correctly disabled
// 01:00:00 and 00:00:00 should be correctly disabled because they are not included
expect(
Array.from(disabledTimeItems).map((node) => node.textContent),
).toContain("01:00:00");
Expand Down

0 comments on commit 9af5770

Please sign in to comment.