Skip to content

Commit 114f087

Browse files
committed
fix: remove invalid test (min changed to 1)
1 parent ff13052 commit 114f087

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

examples/RangeMinMax.test.tsx

+5-16
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import { user } from "@/test/user";
88

99
import { RangeMinMax } from "./RangeMinMax";
1010

11+
const today = new Date(2022, 8, 12);
12+
13+
beforeAll(() => jest.setSystemTime(today));
14+
afterAll(() => jest.useRealTimers());
15+
1116
beforeEach(() => render(<RangeMinMax />));
1217

1318
describe("when a day is clicked", () => {
@@ -18,22 +23,6 @@ describe("when a day is clicked", () => {
1823
test("should be selected", () => {
1924
expect(gridcell(firstDay, true)).toHaveAttribute("aria-selected", "true");
2025
});
21-
describe("when the day before min is clicked", () => {
22-
const dayAfter = addDays(firstDay, 1);
23-
beforeEach(async () => {
24-
await user.click(dateButton(dayAfter));
25-
});
26-
test("the first day should not be selected", () => {
27-
expect(gridcell(firstDay, true)).not.toHaveAttribute(
28-
"aria-selected",
29-
"true"
30-
);
31-
});
32-
test("the day after should be selected", () => {
33-
expect(gridcell(dayAfter, true)).toHaveAttribute("aria-selected", "true");
34-
});
35-
});
36-
3726
describe("when the day after min is clicked", () => {
3827
const dayAfter = addDays(firstDay, 4);
3928
beforeEach(async () => {

0 commit comments

Comments
 (0)