Skip to content

Commit 17ddc16

Browse files
r0b1ngjulivan
authored andcommitted
fix: fix unit tests
1 parent 4923307 commit 17ddc16

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/shared/widget-plugin-filtering/src/__tests__/DateInputFilterStore.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ describe("DateInputFilterStore", () => {
117117
attr.id = attrId("attr_009");
118118
expect(store.condition).toEqual(
119119
and(
120-
dayGreaterThanOrEqual(attribute(attr.id), literal(new Date("2024-09-17T00:00:00.000Z"))),
121-
dayLessThan(attribute(attr.id), literal(new Date("2024-10-01T00:00:00.000Z"))),
120+
dayGreaterThanOrEqual(attribute(attr.id), literal(new Date("2024-09-17T15:59:13.000Z"))),
121+
dayLessThan(attribute(attr.id), literal(new Date("2024-10-01T11:12:13.000Z"))),
122122
equals(literal("__RANGE_MARKER__"), literal("__RANGE_MARKER__"))
123123
)
124124
);

packages/shared/widget-plugin-filtering/src/stores/DateInputFilterStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,5 +293,5 @@ function addDay(date: Date): Date {
293293
function subDay(date: Date): Date {
294294
const newDate = new Date(date.getTime());
295295
newDate.setUTCDate(newDate.getUTCDate() - 1);
296-
return date;
296+
return newDate;
297297
}

0 commit comments

Comments
 (0)