-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Attempting to configurable attribute of unconfigurable property. #1456
Comments
Where do you mean you set the configurable option? It's not in the code. Thanks for finding the regression btw |
#1419 PR sets a |
👌. I guess we could wrap those defineProperty calls in a try/catch. Unless there is some way of knowing if they are configurable before attempting? |
@fatso83 Yup, there's an easy way to do it. We can use Then we need to check if that property exists and if it's configurable in order to decide how This change should be enough to fix this issue. @gyandeeps if you want to do a PR for this I'd be more than happy to review it. I don't think I will have enough time to work on this in the next two weeks, so if anyone wants to tackle it I highly encourage you to do so. Otherwise I can work on it (alongside the other ongoing things I have got here) when I come back. |
@lucasfcosta There is a PR ready for review from you at #1462 :-) |
#1462 didn't fix this in all environments, the build fails in Safari 9.0
Unfortunately, I was a bit too fast at getting a new release out the door, so now we have |
That doesn't work currently. I think we should just leave it as is, and then fix that error asap. |
Maybe it's OK to just drop the failing test? There isn't a way of "fixing" the test for Safari anyhow - it doesn't allow modifying that property. |
I liked your proposal about using try/catch. Could that be applicable here? |
We cannot unpublish but we can move the From the
This is the command you've gotta use for that:
|
Avoid running test for #1456 on Safari
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
…nonjs#1462) * Fix: check configurable on a prop before creating (fixes sinonjs#1456)
System info
Node: 8
babel-polyfill: 6.23.0
core-js: ^2.4.0
phantomjs-prebuilt: 2.1.14
Sinon: 2.3.1 (no issue) - 2.3.2 (has issue)
What did you expect to happen?
What actually happens
I use
karma
run unit test.webpack
for bundling andbabel
for code translation and polyfill. Running my unit test usingphantomjs
and i get the following error:How to reproduce
UPDATE
Regression: #1419
configurable: true
then it works fine.The text was updated successfully, but these errors were encountered: