1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +00:00

LibJS/Tests: Tweak PlainYearMonth Infinity test values

Since we want to test that +/- Infinity fails as an argument, we should
provide valid arguments for everything else - 0 for month isn't :^)
This commit is contained in:
Linus Groh 2021-08-14 23:51:33 +01:00
parent 24fcff45ae
commit 301d622b46

View file

@ -16,7 +16,7 @@ describe("errors", () => {
new Temporal.PlainYearMonth(0, Infinity);
}).toThrowWithMessage(RangeError, "Invalid plain year month");
expect(() => {
new Temporal.PlainYearMonth(0, 0, {}, Infinity);
new Temporal.PlainYearMonth(0, 1, {}, Infinity);
}).toThrowWithMessage(RangeError, "Invalid plain year month");
expect(() => {
new Temporal.PlainYearMonth(-Infinity);
@ -25,7 +25,7 @@ describe("errors", () => {
new Temporal.PlainYearMonth(0, -Infinity);
}).toThrowWithMessage(RangeError, "Invalid plain year month");
expect(() => {
new Temporal.PlainYearMonth(0, 0, {}, -Infinity);
new Temporal.PlainYearMonth(0, 1, {}, -Infinity);
}).toThrowWithMessage(RangeError, "Invalid plain year month");
});