get-own-property-sym.js (1094B)
1 // |reftest| module 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-module-namespace-exotic-objects-getownproperty-p 6 description: > 7 Behavior of the [[GetOwnProperty]] internal method with a Symbol argument 8 flags: [module] 9 features: [Symbol, Symbol.toStringTag] 10 ---*/ 11 12 import * as ns from './get-own-property-sym.js'; 13 var notFound = Symbol('test262'); 14 var desc; 15 16 assert.sameValue( 17 Object.prototype.hasOwnProperty.call(ns, Symbol.toStringTag), true 18 ); 19 desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag); 20 assert.sameValue(desc.value, ns[Symbol.toStringTag]); 21 assert.sameValue(desc.enumerable, false, 'Symbol.toStringTag enumerable'); 22 assert.sameValue(desc.writable, false, 'Symbol.toStringTag writable'); 23 assert.sameValue(desc.configurable, false, 'Symbol.toStringTag configurable'); 24 25 assert.sameValue(Object.prototype.hasOwnProperty.call(ns, notFound), false); 26 desc = Object.getOwnPropertyDescriptor(ns, notFound); 27 assert.sameValue(desc, undefined); 28 29 reportCompare(0, 0);