compat-table icon indicating copy to clipboard operation
compat-table copied to clipboard

Proxy tests w/ Array filter/map

Open jrsearles opened this issue 9 years ago • 3 comments

The ES6 tests for "Array.prototype iteration methods" under "Proxy, internal 'get' calls" are failing for filter & map methods in an environment i am testing. The "constructor" property is also called, which seems correct according to my reading of ArraySpeciesCreate.

If you agree, i can submit a PR to update the test.

jrsearles avatar Dec 31 '15 00:12 jrsearles

Which environment?

ljharb avatar Dec 31 '15 01:12 ljharb

A virtual environment i am working on (https://github.com/jrsearles/SandBoxr). I'm trying to suss out whether the test is wrong or my understanding of the spec is wrong.

jrsearles avatar Dec 31 '15 01:12 jrsearles

Yes, I read it the same as you do. All of the methods' [[Get]] traps should be length, then constructor, then Symbol.species (only when the constructor isn't === Array), then the rest.

ljharb avatar Dec 31 '15 02:12 ljharb