mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 02:56:10 +00:00
LibJS: Implement Temporal.Calendar.prototype.monthCode
This commit is contained in:
parent
a0af9b11fb
commit
9d9ba29cae
Notes:
sideshowbarker
2024-07-18 08:28:06 +09:00
Author: https://github.com/IdanHo
Commit: 9d9ba29cae
Pull-request: https://github.com/SerenityOS/serenity/pull/8961
Reviewed-by: https://github.com/linusg ✅
5 changed files with 56 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.Calendar.prototype.monthCode).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
const date = new Temporal.PlainDate(2021, 7, 23);
|
||||
expect(calendar.monthCode(date)).toBe("M07");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue