Skip to content

Commit

Permalink
#GOCLD 2298 test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
preetigairi committed Mar 12, 2024
1 parent 1f50b97 commit e191a7e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,16 @@ describe('LocaleFormat', () => {
dec.toUTCString() + ' is not a valid date'
);
});
it('should return true for a leap year date', () => {
const nonLeapYear: Date = new Date(2021, 1, 29);
expect(LocaleFormat.validDate(nonLeapYear.getMonth(), nonLeapYear.getDate(), nonLeapYear.getFullYear())).toBeTruthy(
nonLeapYear.toUTCString() + ' is not a valid date'
)});

it('should return false for a non leap year date', () => {
const leapYear: Date = new Date(2020, 1, 29);
expect(LocaleFormat.validDate(leapYear.getMonth(), leapYear.getDate(), leapYear.getFullYear())).toBeTruthy(
leapYear.toUTCString() + ' is a valid date'
)});
});
});

0 comments on commit e191a7e

Please sign in to comment.