Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getoffsetnanosecondsfor tests might be inconsistently passing/failing #213

Open
12wrigja opened this issue Jan 19, 2023 · 1 comment
Open

Comments

@12wrigja
Copy link
Contributor

While debugging CI failures in #210 , it seems that only some of the test262 cases for toLocaleString/timezone-getoffsetnanosecondsfor-not-callable.js fail, and some pass:

Passing:
PlainTime
PlainDate
PlainDateTime

Failing:
PlainYearMonth
PlainMonthDay
DateTimeFormat/prototype/format
DateTimeFormat/prototype/formatToParts
DateTimeFormat/prototype/formatRange
DateTimeFormat/prototype/formatRangeToParts

I haven't looked at all the testcases but given they are likely all very similarly structured I'm wondering this is indicative of a bug somewhere?

Failing that, it would be nice to improve the documentation to explain why those tests fail on Node<16 more clearly.

@justingrant
Copy link
Contributor

Is the difference that the passing ones are calling toLocaleString with no arguments, while the failing ones are calling with these arguments?

instance.toLocaleString(undefined, { calendar: "iso8601" })

It may be that Node 14 didn't support the calendar option, so it's failing with a RangeError before the uncallable thing is called?

So it's not like these tests run without exceptions in any case. It's only that the ones with a calendar option fail in an unexpected way (RangeError) on Node 14, while the ones without a calendar option fail in an expected way (TypeError).

Anyway, I think it's OK to just put the failing tests into the expected-failures-before-node16.txt and leave the passing tests (the ones that fail with the expected TypeError) out of that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants