2025-03-05 02:05:18 +08:00
|
|
|
import * as mod from "./module.js";
|
|
|
|
import * as style from "./style.css";
|
|
|
|
import * as text1 from "./text-with-bom.txt";
|
|
|
|
import * as text2 from "./test-without-bom.text";
|
|
|
|
|
2025-10-03 02:55:56 +08:00
|
|
|
it("should remove BOM", async function() {
|
2025-03-05 02:05:18 +08:00
|
|
|
const url = new URL("./resource-with-bom.ext", import.meta.url);
|
|
|
|
|
|
|
|
expect(mod).toBeDefined();
|
|
|
|
expect(style).toBeDefined();
|
|
|
|
expect(text1).toBeDefined();
|
|
|
|
expect(text2).toBeDefined();
|
|
|
|
expect(url).toBeDefined();
|
|
|
|
|
|
|
|
const module = "module.js"
|
2025-10-03 02:55:56 +08:00
|
|
|
const modules = await import("./dir/" + module);
|
2025-03-05 02:05:18 +08:00
|
|
|
|
|
|
|
expect(modules).toBeDefined();
|
|
|
|
});
|