-
Notifications
You must be signed in to change notification settings - Fork 483
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
Adding tests for Array.prototype.copyWithin #2443
Conversation
…ity bug in Moddable
I tried adding these tests to the es6-shim; the "coerced-values-start-change-start" tests appear to fail in latest node (where the implementation is native), as well as with the es6-shim applied in both latest node and 0.10. Specifically, it's getting an empty array where it expects a dense array of 24 undefineds - perhaps my test framework's assertion is incorrect (maybe it's different than |
…ity bug in Moddable
Yeah, I think this is a difference in how compare array works. The correct array to return is an empty array of length 20, but when it gets compared, the value is converted to undefined anyhow, but I'm guessing that doesn't happen in your harness. Anyhow, I updated it to compare the empty array, this makes it simpler, and hopefully will work with your harness as well. |
test/built-ins/Array/prototype/copyWithin/coerced-values-start-change-start.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass on es6-shim on all envs as well as natively on v8.
Just following up here. Is there anything I need to do to get this merged? |
A security test for copyWithin. This checks that Array.prototype.copyWithin behaves correctly in the case that converting the start parameter to an integer has side effects. This caused a security bug in Moddable Moddable-OpenSource/moddable#123