LibJS: Remove support for the "assert" keyword for import attributes

This was removed from the spec some time ago. See:
14286bb
This commit is contained in:
Timothy Flynn 2025-01-20 12:07:29 -05:00 committed by Andreas Kling
commit b64a355a30
Notes: github-actions[bot] 2025-01-21 13:59:26 +00:00
7 changed files with 14 additions and 31 deletions

View file

@ -179,8 +179,8 @@ describe("in- and exports", () => {
);
});
test("can import with (useless) assertions", () => {
expectModulePassed("./import-with-assertions.mjs");
test("can import with (useless) attributes", () => {
expectModulePassed("./import-with-attributes.mjs");
});
test("namespace has expected ordering", () => {

View file

@ -1,4 +0,0 @@
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" };

View file

@ -0,0 +1,4 @@
import * as self from "./import-with-attributes.mjs" with { key: "value", key2: "value2", default: "shouldwork" };
import "./import-with-attributes.mjs" with { key: "value", key2: "value2", default: "shouldwork" };
export { passed } from "./module-with-default.mjs" with { key: "value", key2: "value2", default: "shouldwork" };

View file

@ -4,7 +4,7 @@ describe("basic behavior", () => {
let error = null;
let result = null;
import("./json-module.json", { assert: { type: "json" } })
import("./json-module.json", { with: { type: "json" } })
.then(jsonObj => {
passed = true;
result = jsonObj;