Using tests from test262
Hi!
Here are some changes based on the latest spec changes:
- Array operations no longer use
ToUint32. Instead, they useToLengthwhich makes much more sense. - Uncallable predicates must throw even when the array is empty.
Can the test262 tests not be brought in as an npm dependency rather than a hardcoded file?
Also, please feel free to look at the es6-shim implementation and verify if it needs any corrections, since you're freshly informed on it.
@ljharb I wish we could! Test262 is not based on Mocha. I just wrote a thin wrapper and modified a couple of tests to make it work in Mocha+Node.
ping @bterlson @smikes for another use case for npm-runnable test262 tests :-)
What is needed from bterlson/test262-harness to make it work for this project?
The changes to the implementation have been applied in master:
Array operations no longer use ToUint32. Instead, they use ToLength which makes much more sense. -- https://github.com/paulmillr/Array.prototype.find/blob/master/implementation.js#L8 Uncallable predicates must throw even when the array is empty. -- https://github.com/paulmillr/Array.prototype.find/blob/master/implementation.js#L9
@juandopazo would you mind freshly rebasing this on top of master so it can be reconsidered?