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:
parent
83bbbbe567
commit
3ee169d8e7
3 changed files with 26 additions and 0 deletions
|
@ -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");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue