summaryrefslogtreecommitdiff
path: root/test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js')
-rw-r--r--test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js b/test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js
new file mode 100644
index 000000000..95d038ee5
--- /dev/null
+++ b/test/built-ins/Reflect/enumerate/does-not-iterate-over-symbol-properties.js
@@ -0,0 +1,37 @@
+// Copyright (C) 2015 Leonardo Balter. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 26.1.5
+description: >
+ Returned iterator does not iterate over symbol properties.
+info: >
+ 26.1.5 Reflect.enumerate ( target )
+
+ ...
+ 2. Return target.[[Enumerate]]().
+features: [Symbol]
+---*/
+
+var iter, step;
+var s = Symbol('1');
+
+var o = {
+ 'a': 1,
+ 'b': 1
+};
+
+o[s] = 1;
+
+iter = Reflect.enumerate(o);
+
+step = iter.next();
+assert.sameValue(step.value, 'a');
+assert.sameValue(step.done, false);
+
+step = iter.next();
+assert.sameValue(step.value, 'b');
+assert.sameValue(step.done, false);
+
+step = iter.next();
+assert.sameValue(step.value, undefined);
+assert.sameValue(step.done, true);