Skip to content
Snippets Groups Projects
Commit e0387bce authored by Mike Pennisi's avatar Mike Pennisi
Browse files

Refactor tests for built-in @@iterator methods

Assert the value of the properties and update the test frontmatter to
include the `Symbol.iterator` feature.
parent eefc23df
Branches
No related tags found
No related merge requests found
...@@ -2,13 +2,19 @@ ...@@ -2,13 +2,19 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
description: > description: Initial state of the Symbol.iterator property
The method should exist on the Array prototype, and it should be writable info: >
and configurable, but not enumerable. The initial value of the @@iterator property is the same function object as
includes: [propertyHelper.js] the initial value of the Array.prototype.values property.
es6id: 22.1.3.4
---*/
Per ES6 section 17, the method should exist on the Array prototype, and it
should be writable and configurable, but not enumerable.
includes: [propertyHelper.js]
features: [Symbol.iterator]
es6id: 22.1.3.30
---*/
assert.sameValue(Array.prototype[Symbol.iterator], Array.prototype.values);
verifyNotEnumerable(Array.prototype, Symbol.iterator); verifyNotEnumerable(Array.prototype, Symbol.iterator);
verifyWritable(Array.prototype, Symbol.iterator); verifyWritable(Array.prototype, Symbol.iterator);
verifyConfigurable(Array.prototype, Symbol.iterator); verifyConfigurable(Array.prototype, Symbol.iterator);
...@@ -2,12 +2,17 @@ ...@@ -2,12 +2,17 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
description: > description: Initial state of the Symbol.iterator property
The method should exist on the Map prototype, and it should be writable info: >
and configurable, but not enumerable. The initial value of the @@iterator property is the same function object as
includes: [propertyHelper.js] the initial value of the entries property.
es6id: 23.1.3.12
---*/ Per ES6 section 17, the method should exist on the Array prototype, and it
should be writable and configurable, but not enumerable.
includes: [propertyHelper.js]
features: [Symbol.iterator]
es6id: 23.1.3.12
---*/
verifyNotEnumerable(Map.prototype, Symbol.iterator); verifyNotEnumerable(Map.prototype, Symbol.iterator);
verifyWritable(Map.prototype, Symbol.iterator); verifyWritable(Map.prototype, Symbol.iterator);
......
...@@ -2,13 +2,19 @@ ...@@ -2,13 +2,19 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
description: > description: Initial state of the Symbol.iterator property
The method should exist on the Array prototype, and it should be writable info: >
and configurable, but not enumerable. The initial value of the @@iterator property is the same function object as
includes: [propertyHelper.js] the initial value of the values property.
es6id: 23.2.3.11
---*/
Per ES6 section 17, the method should exist on the Set prototype, and it
should be writable and configurable, but not enumerable.
includes: [propertyHelper.js]
features: [Symbol.iterator]
es6id: 23.2.3.11
---*/
assert.sameValue(Set.prototype[Symbol.iterator], Set.prototype.values);
verifyNotEnumerable(Set.prototype, Symbol.iterator); verifyNotEnumerable(Set.prototype, Symbol.iterator);
verifyWritable(Set.prototype, Symbol.iterator); verifyWritable(Set.prototype, Symbol.iterator);
verifyConfigurable(Set.prototype, Symbol.iterator); verifyConfigurable(Set.prototype, Symbol.iterator);
...@@ -7,6 +7,7 @@ description: > ...@@ -7,6 +7,7 @@ description: >
protocol. protocol.
includes: [propertyHelper.js] includes: [propertyHelper.js]
flags: [noStrict] flags: [noStrict]
features: [Symbol.iterator]
---*/ ---*/
(function() { (function() {
......
...@@ -7,6 +7,7 @@ description: > ...@@ -7,6 +7,7 @@ description: >
protocol. protocol.
includes: [propertyHelper.js] includes: [propertyHelper.js]
flags: [noStrict] flags: [noStrict]
features: [Symbol.iterator]
---*/ ---*/
(function() { (function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment