tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

instn-star-props-dflt-skip.js (1495B)


      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 description: >
      6    Default exports are not included in the module namespace object
      7 esid: sec-moduledeclarationinstantiation
      8 info: |
      9    [...]
     10    12. For each ImportEntry Record in in module.[[ImportEntries]], do
     11        a. Let importedModule be ? HostResolveImportedModule(module,
     12           in.[[ModuleRequest]]).
     13        b. If in.[[ImportName]] is "*", then
     14           i. Let namespace be ? GetModuleNamespace(importedModule).
     15    [...]
     16 
     17    15.2.1.18 Runtime Semantics: GetModuleNamespace
     18 
     19    [...]
     20    3. If namespace is undefined, then
     21       a. Let exportedNames be ? module.GetExportedNames(« »).
     22       [...]
     23 
     24    15.2.1.16.2 GetExportedNames
     25 
     26    [...]
     27    7. For each ExportEntry Record e in module.[[StarExportEntries]], do
     28       [...]
     29       c. For each element n of starNames, do
     30          i. If SameValue(n, "default") is false, then
     31          [...]
     32 flags: [module]
     33 ---*/
     34 
     35 import * as named from './instn-star-props-dflt-skip-star-named_FIXTURE.js';
     36 import * as production from './instn-star-props-dflt-skip-star-prod_FIXTURE.js';
     37 
     38 assert('namedOther' in named);
     39 assert.sameValue(
     40  'default' in named, false, 'default specified via identifier'
     41 );
     42 
     43 assert('productionOther' in production);
     44 assert.sameValue(
     45  'default' in production, false, 'default specified via dedicated production'
     46 );
     47 
     48 reportCompare(0, 0);