diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/modules')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/modules/basic-modules.js | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Tests/modules/re-export-namespace-via-binding.mjs | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/modules/basic-modules.js b/Userland/Libraries/LibJS/Tests/modules/basic-modules.js index 2dad8a834b..cf662213fd 100644 --- a/Userland/Libraries/LibJS/Tests/modules/basic-modules.js +++ b/Userland/Libraries/LibJS/Tests/modules/basic-modules.js @@ -190,6 +190,10 @@ describe("in- and exports", () => { test("can have multiple star imports even from the same file", () => { expectModulePassed("./multiple-star-imports.mjs"); }); + + test("can export namespace via binding", () => { + expectModulePassed("./re-export-namespace-via-binding.mjs"); + }); }); describe("loops", () => { diff --git a/Userland/Libraries/LibJS/Tests/modules/re-export-namespace-via-binding.mjs b/Userland/Libraries/LibJS/Tests/modules/re-export-namespace-via-binding.mjs new file mode 100644 index 0000000000..91d5fcc606 --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/modules/re-export-namespace-via-binding.mjs @@ -0,0 +1,7 @@ +import * as namespace from "./default-and-star-export.mjs"; +import { "*" as fromStar } from "./default-and-star-export.mjs"; +export { namespace }; + +import { namespace as nm } from "./re-export-namespace-via-binding.mjs"; + +export const passed = nm === namespace && fromStar === namespace["*"]; |