mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
LibJS: Implement Temporal.Calendar.prototype.id
This commit is contained in:
parent
3ee169d8e7
commit
466c5bc96d
4 changed files with 23 additions and 2 deletions
|
@ -29,8 +29,7 @@ describe("normal behavior", () => {
|
|||
|
||||
test("basic functionality", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
// FIXME: Enable this once Temporal.Calendar.prototype.id is implemented
|
||||
// expect(calendar.id).toBe("iso8601");
|
||||
expect(calendar.id).toBe("iso8601");
|
||||
expect(typeof calendar).toBe("object");
|
||||
expect(calendar).toBeInstanceOf(Temporal.Calendar);
|
||||
expect(Object.getPrototypeOf(calendar)).toBe(Temporal.Calendar.prototype);
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
describe("correct behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
const calendar = new Temporal.Calendar("iso8601");
|
||||
expect(calendar.id).toBe("iso8601");
|
||||
});
|
||||
|
||||
test("works with any this value", () => {
|
||||
expect(Reflect.get(Temporal.Calendar.prototype, "id", "foo")).toBe("foo");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue