LibJS: Implement the ECMA-402 Instant.prototype.toLocaleString.js

This commit is contained in:
Timothy Flynn 2024-11-27 16:13:47 -05:00 committed by Andreas Kling
commit 964f41bb53
Notes: github-actions[bot] 2024-11-29 08:53:41 +00:00
2 changed files with 14 additions and 4 deletions

View file

@ -5,7 +5,7 @@ describe("correct behavior", () => {
test("basic functionality", () => {
const instant = new Temporal.Instant(1625614921123456789n);
expect(instant.toLocaleString()).toBe("2021-07-06T23:42:01.123456789Z");
expect(instant.toLocaleString([], { timeZone: "UTC" })).toBe("7/6/2021, 11:42:01 PM");
});
});