-
Notifications
You must be signed in to change notification settings - Fork 621
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
assertEquals
fails to throw on unequal instances of built-ins such as Temporal
APIs (with --unstable-temporal
flag) or URLSearchParams
#6151
Comments
It looks like it's because objects are compared using own-properties, but all the properties of Possible means of patching for |
Adding special path for builtin |
I agree that there should be no special handling for polyfills, but also any solution for built-in I'm not sure to what extent special-casing Temporal really makes sense, except maybe implementing a fast path if that noticeably improves perf. Notably, Upon further testing, |
assertEquals
fails when comparing various Temporal
instances with polyfill or --unstable-temporal
flagassertEquals
fails to throw on unequal instances of built-ins such as Temporal
APIs (with --unstable-temporal
flag) or URLSearchParams
Fair enough. Dependency to Deno's specific implementation doesn't sound great. #6153 makes sense to me. |
Describe the bug
assertEquals
fails when comparing variousTemporal
instances with polyfill or--unstable-temporal
flag. It also similarly fails to compare other built-ins, such asURLPattern
andURLSearchParams
.Steps to Reproduce
Equivalent results can be observed with unequal instances of
Temporal.Instant
,Temporal.ZonedDateTime
,URLPattern
, etc.Expected behavior
assertEquals
to throw when the instances are not value-equal.Environment
OS: Ubuntu 20.04, WSL on Windows 11
deno version: 2.0.3
std version: [email protected]
The text was updated successfully, but these errors were encountered: