mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.dayOfWeek
This commit is contained in:
parent
518a9f3eab
commit
c41b7b27c9
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.dayOfWeek).toBe(5);
|
||||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "dayOfWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue