string-import-namespace-indirect.mjs 817 B

1234567891011121314151617
  1. import * as indirectNs from "./default-and-star-export-indirect.mjs";
  2. // This is an all-but-default export and should thus only provide "*" and "".
  3. // default-and-star-export-indirect.mjs:
  4. // export * from "./default-and-star-export.mjs";
  5. import * as indirectNsString from "./default-and-star-export-indirect-string.mjs";
  6. // This is an all export and should thus provide the full namespace.
  7. // default-and-star-export-indirect-string.mjs:
  8. // export * as "viaString" from "./default-and-star-export.mjs";
  9. export const passed =
  10. indirectNs["*"] === "starExportValue" &&
  11. indirectNs[""] === "empty" &&
  12. indirectNs.default === undefined &&
  13. indirectNsString.viaString["*"] === "starExportValue" &&
  14. indirectNsString.viaString[""] === "empty" &&
  15. indirectNsString.viaString.default === "defaultValue";