mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:37:34 +00:00
LibJS: Allow anonymous functions as default exports
This requires a special case with names as the default function is supposed to have a unique name ("*default*" in our case) but when checked should have name "default".
This commit is contained in:
parent
0fc67ffd62
commit
9f661d20f7
5 changed files with 79 additions and 19 deletions
|
@ -202,6 +202,10 @@ describe("in- and exports", () => {
|
|||
test("import lexical binding before import statement behaves as initialized but non mutable binding", () => {
|
||||
expectModulePassed("./accessing-lex-import-before-decl.mjs");
|
||||
});
|
||||
|
||||
test("exporting anonymous function", () => {
|
||||
expectModulePassed("./anon-func-decl-default-export.mjs");
|
||||
});
|
||||
});
|
||||
|
||||
describe("loops", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue