Debian Codegraph @

js/src/jit-test/tests/collections/Set-add-returns-this.js

raw
1 // Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and
2 // Set.prototype.add should be chainable
3
4 var s = new Set();
5 assertEq(s.add('BAR'), s);
6 var b = s.add('foo').has('foo');
7 assertEq(b, true);