build: consolidate typed frontend module graph
This commit is contained in:
@@ -10,10 +10,11 @@ const indexPath = new URL("../../assets/web/index.html", import.meta.url);
|
||||
const pluginLoaderPath = new URL("../src/plugin-loader.ts", import.meta.url);
|
||||
const mapCorePath = new URL("../src/map-core.ts", import.meta.url);
|
||||
|
||||
test("index loads the shared UI before the application", async () => {
|
||||
test("index loads one first-party application bootstrap", async () => {
|
||||
const html = await readFile(indexPath, "utf8");
|
||||
assert.ok(html.indexOf("/ui-core.js") < html.indexOf("/app.js"));
|
||||
assert.ok(html.indexOf("/plugin-loader.js") < html.indexOf("/app.js"));
|
||||
assert.equal((html.match(/<script[^>]+src="\/(?!vendor\/)[^"]+\.js"/g) ?? []).length, 1);
|
||||
assert.match(html, /src="\/app\.js"/);
|
||||
assert.doesNotMatch(html, /src="\/(?:ui-core|plugin-runtime|plugin-loader|webgl-renderer|leaflet-ais-tracksymbol)\.js"/);
|
||||
assert.equal(html.includes("var pluginScripts"), false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user