-
Notifications
You must be signed in to change notification settings - Fork 464
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
intl402/NumberFormat/length.js is incorrect #1591
Comments
The problem isn't that |
Is there a reason the helpers couldn’t clean up after themselves, so as to avoid this footgun? |
@ljharb they can, you just have to tell it to with the |
Is there a reason restore true can’t be the default? |
@ljharb tests should be atomic, for that case, each test case should never produce side effects over other cases. The restore option is a workaround I consider a bad practice. Ideally you should rely on the original version for each test depending on it, and never restoring a thing to what we consider to be original. In the testing philosophy this might cause false positives. In the case fixed at acf6de1, the problem was not about isolation but using the helpers to check the same thing twice. I believe with the current granularity of Test262, we can perfectly live without ever having to use the restore option, and all the tests can always benefit from that. I'd love to talk more about this if you're interested. Just let me know. |
Thank you for the quick fix, @rwaldron! I agree with @leobalter and @rwaldron here about tests being atomic and we shouldn't have I suggested the renaming to Is there anyway to codify the expectation that we shouldn't be calling the helpers on the same thing twice so that this doesn't happen in the future? |
…verifyNotWritable, verifyConfigurable. Fixes tc39gh-1591
In
intl402/NumberFormat/length.js
,verifyConfigurable
callsisConfigurable
which deletes theIntl.NumberFormat.length
property.verifyProperty
tries to lookup this now deletedlength
property, usingObject.prototype.hasOwnProperty
which fails and throws.This needs to be fixed.
Also, can we rename
verifyConfigurable
toverifyConfigurableAndDelete
or something that shows that this is destructive?This has happened before as well:
#1467
The text was updated successfully, but these errors were encountered: