Skip to content

Commit 97c0d72

Browse files
committed
DatePicker helpers test case issue fixed
1 parent fb35e8c commit 97c0d72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/ui/src/components/Datepicker/helpers.spec.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,20 @@ describe("addYears", () => {
154154
describe("getFormattedDate", () => {
155155
it("returns the formatted date string using the default options", () => {
156156
const date = new Date(2023, 0, 15); // January 15th, 2023
157-
const formattedDate = getFormattedDate("en", date);
157+
const formattedDate = getFormattedDate("en", date, 'dd-MMM-yyyy');
158158
expect(formattedDate).toBe("January 15, 2023");
159159
});
160160

161161
it("returns the formatted date string using the specified options", () => {
162162
const date = new Date(2023, 0, 15); // January 15th, 2023
163163
const options: Intl.DateTimeFormatOptions = { month: "short", year: "numeric" };
164-
const formattedDate = getFormattedDate("en", date, options);
164+
const formattedDate = getFormattedDate("en", date, 'dd-MMM-yyyy', options);
165165
expect(formattedDate).toBe("Jan 2023");
166166
});
167167

168168
it("returns the formatted date string using the specified language", () => {
169169
const date = new Date(2023, 0, 15); // January 15th, 2023
170-
const formattedDate = getFormattedDate("pt-BR", date);
170+
const formattedDate = getFormattedDate("pt-BR", date, 'dd-MMM-yyyy');
171171
expect(formattedDate).toBe("15 de janeiro de 2023");
172172
});
173173
});

0 commit comments

Comments
 (0)