1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibJS: Add some more tests, mostly around leap years

This commit is contained in:
Nico Weber 2020-08-25 20:07:36 -04:00 committed by Andreas Kling
parent 9b17082899
commit 2c1b84b3e1
2 changed files with 23 additions and 0 deletions

View file

@ -26,6 +26,10 @@ test("basic functionality", () => {
expect(Date.UTC(20000, 0)).toBe(568971820800000);
});
test("leap year", () => {
expect(Date.UTC(2020, 2, 1)).toBe(1583020800000);
});
test("out of range", () => {
expect(Date.UTC(2020, -20)).toBe(1525132800000);
expect(Date.UTC(2020, 20)).toBe(1630454400000);