Open p-bakker opened 4 months ago
Just an FYI for anyone else, a lot of the test262 tests for these methods fail because they use spread syntax and/or classes
Any idea if those test really depend on spread and classes? If not, we could consider creating a PR with the test262 project with changes that eliminate the dependency on spread and classes.
Recently did the same for some other code in test262 that used syntax Rhino couldn't handle and the test262 is quite receptive to such changes
I don't think the spread is necessary. They are only used to compare the values in the set with the expected values in an array, at the very end. They could be using Array.from instead.
However, the classes are probably needed just for completeness.
Just looked at the tests for the 'difference' method and the relative tiny subset of tests that use classes explicitly seem to test the method icw classes, so nothing that we can do about those (unless someone feels like taking a stab at implementing classes 🤪)
The use of the spread operator can be replaced with .apply in the tests, making them compatible with Rhino
Or we try to implement the spread syntax in Rhino 🙂
https://github.com/tc39/proposal-set-methods