Debian Codegraph @

js/src/tests/test262/language/module-code/namespace/internals/has-property-str-not-found.js

raw
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-hasproperty-p
6 description: >
7 Behavior of the [[HasProperty]] internal method with a string argument for
8 non-exported bindings
9 info: |
10 [...]
11 2. Let exports be the value of O's [[Exports]] internal slot.
12 3. If P is an element of exports, return true.
13 4. Return false.
14 flags: [module]
15 features: [Reflect]
16 ---*/
17
18 import * as ns from './has-property-str-not-found.js';
19 var test262;
20 export { test262 as anotherName };
21
22 assert.sameValue('test262' in ns, false, 'in: test262');
23 assert.sameValue(Reflect.has(ns, 'test262'), false, 'Reflect.has: test262');
24
25 assert.sameValue('toStringTag' in ns, false, 'in: toStringTag');
26 assert.sameValue(
27 Reflect.has(ns, 'toStringTag'), false, 'Reflect.has: toStringTag'
28 );
29
30 assert.sameValue('iterator' in ns, false, 'in: iterator');
31 assert.sameValue(Reflect.has(ns, 'iterator'), false, 'Reflect.has: iterator');
32
33 assert.sameValue('__proto__' in ns, false, 'in: __proto__');
34 assert.sameValue(
35 Reflect.has(ns, '__proto__'), false, 'Reflect.has: __proto__'
36 );
37
38 assert.sameValue('default' in ns, false, 'in: default');
39 assert.sameValue(Reflect.has(ns, 'default'), false, 'Reflect.has: default');
40
41 reportCompare(0, 0);