summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Set-add-returns-this.js
blob: 88806b8d877d59b45b792ac68128612cbdfac8df (plain)
1
2
3
4
5
6
7
// Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and
// Set.prototype.add should be chainable

var s = new Set();
assertEq(s.add('BAR'), s);
var b = s.add('foo').has('foo');
assertEq(b, true);