Closed wintlu closed 4 years ago
hi @ljharb, need your help on writing tests (don't quite understand how tests work in this repo):
test/symbol.js
?npm run test
, or will the CI run it in real IE11?
const Symbol = () => {}
Symbol.iterator = { next: () => {}, done: false };
it('array has non native Symbol.iterator', () => { expect([][Symbol.iterator]).to.NotNull() });
It's probably better to make a new file, but it's fine to reuse the array file as well. I can reorganize once you've added the test, if needed :-)
To run the tests in IE 11, you'll have to load https://github.com/paulmillr/es6-shim/blob/master/test/index.html in IE 11 yourself, manually.
I'd expect that in an environment with native symbols, the test would just use them, but in an environment without them, it would replicate the conditions that cause #459 - such that the test fails prior to this fix.
google maps fixed in their code, so we don't need to make this change here, thanks!
Fix issue #459
When we include a Symbol shim before
es6-shim
, Symbol.iterator key is not correctly recognized, and this caused bunched of other issues. (for example, cannot retrieve correct iterator from ArrayIterator object)