diff options
Diffstat (limited to 'js/src/tests/non262/Iterator/prototype/forEach/forEach.js')
-rw-r--r-- | js/src/tests/non262/Iterator/prototype/forEach/forEach.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/non262/Iterator/prototype/forEach/forEach.js b/js/src/tests/non262/Iterator/prototype/forEach/forEach.js new file mode 100644 index 0000000000..62ddce6eb7 --- /dev/null +++ b/js/src/tests/non262/Iterator/prototype/forEach/forEach.js @@ -0,0 +1,11 @@ +// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally + +const log = []; +const fn = (value) => log.push(value); +const iter = [1, 2, 3].values(); + +assertEq(iter.forEach(fn), undefined); +assertEq(log.join(','), '1,2,3'); + +if (typeof reportCompare === 'function') + reportCompare(0, 0); |