mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.inLeapYear
This commit is contained in:
parent
b9ed19c850
commit
8f9b4a5ea6
Notes:
sideshowbarker
2024-07-18 07:45:33 +09:00
Author: https://github.com/IdanHo
Commit: 8f9b4a5ea6
Pull-request: https://github.com/SerenityOS/serenity/pull/9097
Reviewed-by: https://github.com/linusg ✅
3 changed files with 32 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
describe("correct behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(2021, 7, 30);
|
||||
expect(plainDateTime.inLeapYear).toBeFalse();
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "inLeapYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue