mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibJS: Implement Temporal.PlainTime.prototype.calendar
This commit is contained in:
parent
ad89a205bc
commit
a8dd1b9480
3 changed files with 46 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
describe("correct behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
const plainTime = new Temporal.PlainTime();
|
||||
expect(plainTime.calendar).toBeInstanceOf(Temporal.Calendar);
|
||||
expect(plainTime.calendar.id).toBe("iso8601");
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "calendar", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainTime");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue