Skip to content

Commit

Permalink
fix: remove invalid test (min changed to 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl committed Jul 30, 2024
1 parent ff13052 commit 114f087
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions examples/RangeMinMax.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { user } from "@/test/user";

import { RangeMinMax } from "./RangeMinMax";

const today = new Date(2022, 8, 12);

beforeAll(() => jest.setSystemTime(today));
afterAll(() => jest.useRealTimers());

beforeEach(() => render(<RangeMinMax />));

describe("when a day is clicked", () => {
Expand All @@ -18,22 +23,6 @@ describe("when a day is clicked", () => {
test("should be selected", () => {
expect(gridcell(firstDay, true)).toHaveAttribute("aria-selected", "true");
});
describe("when the day before min is clicked", () => {
const dayAfter = addDays(firstDay, 1);
beforeEach(async () => {
await user.click(dateButton(dayAfter));
});
test("the first day should not be selected", () => {
expect(gridcell(firstDay, true)).not.toHaveAttribute(
"aria-selected",
"true"
);
});
test("the day after should be selected", () => {
expect(gridcell(dayAfter, true)).toHaveAttribute("aria-selected", "true");
});
});

describe("when the day after min is clicked", () => {
const dayAfter = addDays(firstDay, 4);
beforeEach(async () => {
Expand Down

0 comments on commit 114f087

Please sign in to comment.