LibJS: Set the length of Date.UTC to 7

This is a bit unusual because there is only 1 required argument, but the
spec dictates that the length is 7.
This commit is contained in:
Timothy Flynn 2022-01-05 11:05:56 -05:00 committed by Linus Groh
commit e8f860048e
Notes: sideshowbarker 2024-07-17 21:34:50 +09:00
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
test("length is 7", () => {
expect(Date.UTC).toHaveLength(7);
});
test("basic functionality", () => {
expect(Date.UTC(2020)).toBe(1577836800000);
expect(Date.UTC(2000, 10)).toBe(973036800000);