summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-redefine-iterator-2.js
blob: 186be930c4a5ab15d54d78311ebbb23719c820fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function t()
{
  var a = arguments;
  Object.defineProperty(a, Symbol.iterator, { writable: false, enumerable: true, configurable: false });
  for (var i = 0; i < 5; i++)
    assertEq(a[Symbol.iterator], Array.prototype[Symbol.iterator]);

  var desc = Object.getOwnPropertyDescriptor(a, Symbol.iterator);
  assertEq(desc.value, Array.prototype[Symbol.iterator]);
  assertEq(desc.writable, false);
  assertEq(desc.enumerable, true);
  assertEq(desc.configurable, false);
}
t();