michael@0: load(libdir + "asserts.js"); michael@0: michael@0: // Throw a TypeError if the trap reports the same property twice michael@0: assertThrowsInstanceOf(function () { michael@0: Object.getOwnPropertyNames(new Proxy({}, { michael@0: getOwnPropertyNames: function (target) { michael@0: return [ 'foo', 'foo' ]; michael@0: } michael@0: })); michael@0: }, TypeError);