Skip to content

Commit 6cf6b5c

Browse files
committed
DatePicker helpers test cases fix
1 parent 3ac66cc commit 6cf6b5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ 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, 'dd-MMM-yyyy');
157+
const formattedDate = getFormattedDate("en", date, 'MMMM dd, 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, 'dd-MMM-yyyy', options);
164+
const formattedDate = getFormattedDate("en", date, 'MMM yyyy', options);
165165
expect(formattedDate).toBe("Jan 2023");
166166
});
167167

0 commit comments

Comments
 (0)