Skip to content

Iterator constructor test doesn't work #2275

Open
@foolip

Description

@foolip

https://mdn-bcd-collector.gooborg.com/tests/javascript/builtins/Iterator/Iterator

As discussed in mdn/browser-compat-data#26472 and linked issues, the Iterator constructor cannot be used directly, only as super() for a subclass.

The generated test for it is currently:

(function () {
  if (!("Iterator" in self)) {
    return { result: false, message: "Iterator is not defined" };
  }
  return bcd.testConstructor("Iterator", false);
})();

And that currently results in "Support Unknown" as invoking the constructor throws a TypeError, as it should.

A test for this would have to do something more like the example in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/Iterator#examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions