1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

LibJS: Implement Temporal.PlainMonthDay.prototype.day

This commit is contained in:
Linus Groh 2021-08-15 01:07:49 +01:00
parent 9551aa17d3
commit c2ed3ad66b
3 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,14 @@
describe("correct behavior", () => {
test("basic functionality", () => {
const plainMonthDay = new Temporal.PlainMonthDay(7, 6);
expect(plainMonthDay.day).toBe(6);
});
});
describe("errors", () => {
test("this value must be a Temporal.PlainMonthDay object", () => {
expect(() => {
Reflect.get(Temporal.PlainMonthDay.prototype, "day", "foo");
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainMonthDay");
});
});