Fix incorrect argument

2nd argument of TemporalHelpers.assertPlainDate is year, not Temporal.PlainDate object.
This commit is contained in:
Frank Yung-Fong Tang 2022-01-05 20:09:56 -08:00 committed by Rick Waldron
parent bd1acb51a4
commit 9bfdf89edc
1 changed files with 2 additions and 2 deletions

View File

@ -16,6 +16,6 @@ const badFields = { year: 2019, month: 1, day: 32 };
assert.throws(RangeError, () => Temporal.PlainDate.from(badFields, { overflow: "reject" }),
"bad fields with reject");
TemporalHelpers.assertPlainDate(Temporal.PlainDate.from(badFields),
plainDate, 2019, 1, "M01", 31, "bad fields with missing overflow");
2019, 1, "M01", 31, "bad fields with missing overflow");
TemporalHelpers.assertPlainDate(Temporal.PlainDate.from(badFields, { overflow: "constrain" }),
plainDate, 2019, 1, "M01", 31, "bad fields with constrain");
2019, 1, "M01", 31, "bad fields with constrain");