mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
LibJS: Implement Temporal.PlainDate.prototype.withCalendar
This commit is contained in:
parent
8123e957e3
commit
9fa8f19a0f
Notes:
sideshowbarker
2024-07-18 08:28:26 +09:00
Author: https://github.com/IdanHo
Commit: 9fa8f19a0f
Pull-request: https://github.com/SerenityOS/serenity/pull/8961
Reviewed-by: https://github.com/linusg ✅
4 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.PlainDate.prototype.withCalendar).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = { hello: "friends" };
|
||||
const firstPlainDate = new Temporal.PlainDate(1, 1, 1);
|
||||
expect(firstPlainDate.calendar).not.toBe(calendar);
|
||||
const secondPlainDate = firstPlainDate.withCalendar(calendar);
|
||||
expect(secondPlainDate.calendar).toBe(calendar);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue