summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs
diff options
context:
space:
mode:
authordavidot <davidot@serenityos.org>2022-01-27 02:44:03 +0100
committerLinus Groh <mail@linusgroh.de>2022-01-30 17:40:20 +0000
commitf568939568b69231d5bebae8a9199ee3359e36e3 (patch)
tree92aff9564a1a259b1f4692acab85bb82309de922 /Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs
parente0e4ead2c829ce5af822624fa57ff6eddb3657dd (diff)
downloadserenity-f568939568b69231d5bebae8a9199ee3359e36e3.zip
LibJS: Implement the import assertions proposal
The hard part of parsing them in import statements and calls was already done so this is just removing some check which threw before on assertions. And filtering the assertions based on the result of a new host hook.
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs')
-rw-r--r--Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs b/Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs
new file mode 100644
index 0000000000..e2381201c7
--- /dev/null
+++ b/Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs
@@ -0,0 +1,4 @@
+import * as self from "./import-with-assertions.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };
+import "./import-with-assertions.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };
+
+export { passed } from "./module-with-default.mjs" assert { "key": "value", key2: "value2", default: "shouldwork" };