From f568939568b69231d5bebae8a9199ee3359e36e3 Mon Sep 17 00:00:00 2001 From: davidot Date: Thu, 27 Jan 2022 02:44:03 +0100 Subject: 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. --- Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs (limited to 'Userland/Libraries/LibJS/Tests/modules/import-with-assertions.mjs') 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" }; -- cgit v1.2.3