mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +00:00
LibJS: Throw TypeError if Instant.prototype.round() options is undefined
This is a normative change in the Temporal spec.
See: 943018f
This commit is contained in:
parent
38bef3e28e
commit
e845e7c814
3 changed files with 28 additions and 13 deletions
|
@ -30,6 +30,13 @@ describe("errors", () => {
|
|||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
});
|
||||
|
||||
test("missing options object", () => {
|
||||
expect(() => {
|
||||
const instant = new Temporal.Instant(1n);
|
||||
instant.round();
|
||||
}).toThrowWithMessage(TypeError, "Required options object is missing or undefined");
|
||||
});
|
||||
|
||||
test("invalid rounding mode", () => {
|
||||
expect(() => {
|
||||
const instant = new Temporal.Instant(1n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue