1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

LibJS: Implement Temporal.TimeZone.prototype.toJSON()

This commit is contained in:
Linus Groh 2021-07-08 20:43:15 +01:00
parent 8d00504ff2
commit 7f0fe352e2
3 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,14 @@
describe("correct behavior", () => {
test("length is 0", () => {
expect(Temporal.TimeZone.prototype.toJSON).toHaveLength(0);
});
test("basic functionality", () => {
const timeZone = new Temporal.TimeZone("UTC");
expect(timeZone.toJSON()).toBe("UTC");
});
test("works with any this value", () => {
expect(Temporal.TimeZone.prototype.toJSON.call("foo")).toBe("foo");
});
});