Skip to content

Commit

Permalink
Add func test for strictTime no day period time #805
Browse files Browse the repository at this point in the history
  • Loading branch information
andriivarhanov committed Oct 17, 2022
1 parent 76f3e2d commit f049a7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/ids-locale/ids-locale-func-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1949,6 +1949,9 @@ describe('IdsLocale API', () => {
expect(locale.parseDate('13:77 AM', { dateFormat: 'h:mm a', strictTime: true })).not.toBeDefined();
expect(locale.parseDate('29:33:99', { dateFormat: 'HH:mm:ss', strictTime: true })).not.toBeDefined();
expect(locale.parseDate('29:33:99', { dateFormat: 'H:mm:ss', strictTime: true })).not.toBeDefined();
expect(locale.parseDate('2:15 test', { dateFormat: 'h:mm a', strictTime: true })).not.toBeDefined();
expect(locale.parseDate('2:', { dateFormat: 'h:mm a', strictTime: true })).not.toBeDefined();
expect(locale.parseDate('2', { dateFormat: 'h:mm a', strictTime: true })).not.toBeDefined();

// Non strict
expect(locale.parseDate('11:77:99', { dateFormat: 'H:mm:ss' }).getSeconds()).toEqual(0);
Expand Down

0 comments on commit f049a7a

Please sign in to comment.