mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Implement Temporal.PlainDate.prototype.daysInWeek
This commit is contained in:
parent
623df361e6
commit
2150f5b374
5 changed files with 43 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
describe("correct behavior", () => {
|
||||
test("basic functionality", () => {
|
||||
const date = new Temporal.PlainDate(2021, 7, 23);
|
||||
expect(date.daysInWeek).toBe(7);
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue