mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +00:00
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:
parent
47ba231a9b
commit
b64a355a30
Notes:
github-actions[bot]
2025-01-21 13:59:26 +00:00
Author: https://github.com/trflynn89
Commit: b64a355a30
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3324
7 changed files with 14 additions and 31 deletions
|
@ -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", () => {
|
||||
|
|
|
@ -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" };
|
4
Libraries/LibJS/Tests/modules/import-with-attributes.mjs
Normal file
4
Libraries/LibJS/Tests/modules/import-with-attributes.mjs
Normal 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" };
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue