mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 02:38:59 +00:00
LibJS: Implement Temporal.Calendar.prototype.toJSON()
This commit is contained in:
parent
83bbbbe567
commit
3ee169d8e7
Notes:
sideshowbarker
2024-07-18 09:00:23 +09:00
Author: https://github.com/linusg
Commit: 3ee169d8e7
Pull-request: https://github.com/SerenityOS/serenity/pull/8753
Reviewed-by: https://github.com/IdanHo ✅
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