summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype/forEach/returns-undefined.js
blob: 27cac6eb4535f0f786b2cffb9eb7005c16174e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-set.prototype.forEach
description: >
    Set.prototype.forEach ( callbackfn [ , thisArg ] )

    ...
    8. Return undefined.

---*/

var s = new Set([1]);

assert.sameValue(
  s.forEach(function() {}),
  undefined,
  "`s.forEach(function() {})` returns `undefined`"
);

reportCompare(0, 0);