Skip to content

Commit 1034253

Browse files
committed
chore(*): Try fixing locale specific tests.
1 parent 6c59097 commit 1034253

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

projects/igniteui-angular/src/lib/core/utils.spec.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,8 @@ describe('Utils', () => {
293293
it('should format string to dateTime', () => {
294294
expect(formatDate('2025-01-25T14:15:00', 'short', 'en-US', "Europe/Sofia")).toEqual('1/25/25, 2:15 PM');
295295
expect(formatDate('2025-01-25T14:15:00', 'medium', 'en-US', "Europe/Sofia")).toEqual('Jan 25, 2025, 2:15:00 PM');
296-
expect(formatDate('2025-01-25T14:15:00', 'long', 'en-US', "Europe/Sofia")
297-
.includes('January 25, 2025 at 2:15:00 PM GMT+')).toBeTruthy();
298-
expect(formatDate('2025-01-25T14:15:00', 'full', 'en-US', "Europe/Sofia")
299-
.includes('January 25, 2025 at 2:15:00 PM GMT+')).toBeTruthy();
296+
expect(formatDate('2025-01-25T14:15:00', 'long', 'en-US', "Europe/Sofia")).toEqual('January 25, 2025 at 2:15:00 PM GMT+2');
297+
expect(formatDate('2025-01-25T14:15:00', 'full', 'en-US', "Europe/Sofia")).toEqual('Saturday, January 25, 2025 at 2:15:00 PM GMT+02:00');
300298
});
301299

302300
it('should format string to date', () => {
@@ -309,10 +307,8 @@ describe('Utils', () => {
309307
it('should format string to time', () => {
310308
expect(formatDate('2025-01-25T14:15:00', 'shortTime', 'en-US', "Europe/Sofia")).toEqual('2:15 PM');
311309
expect(formatDate('2025-01-25T14:15:00', 'mediumTime', 'en-US', "Europe/Sofia")).toEqual('2:15:00 PM');
312-
expect(formatDate('2025-01-25T14:15:00', 'longTime', 'en-US', "Europe/Sofia")
313-
.includes('2:15:00 PM GMT+')).toBeTruthy();
314-
expect(formatDate('2025-01-25T14:15:00', 'fullTime', 'en-US', "Europe/Sofia")
315-
.includes('2:15:00 PM GMT+')).toBeTruthy();
310+
expect(formatDate('2025-01-25T14:15:00', 'longTime', 'en-US', "Europe/Sofia")).toEqual('2:15:00 PM GMT+2');
311+
expect(formatDate('2025-01-25T14:15:00', 'fullTime', 'en-US', "Europe/Sofia")).toEqual('2:15:00 PM GMT+02:00');
316312
});
317313

318314
it('should format string to custom format', () => {

0 commit comments

Comments
 (0)