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

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

This commit is contained in:
Linus Groh 2021-07-14 21:16:40 +01:00
parent 83bbbbe567
commit 3ee169d8e7
3 changed files with 26 additions and 0 deletions

View file

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