refactor: route all decoders through plugin runtime
This commit is contained in:
@@ -26,12 +26,14 @@ test("satellite entry registers lifecycle callbacks and forwards georeferenced i
|
||||
Error,
|
||||
console,
|
||||
});
|
||||
const runtime = await readFile(new URL("../../assets/web/generated/plugin-runtime.js", import.meta.url), "utf8");
|
||||
const source = await readFile(new URL("../../assets/web/generated/sat.js", import.meta.url), "utf8");
|
||||
new vm.Script(runtime).runInContext(context);
|
||||
new vm.Script(source).runInContext(context);
|
||||
|
||||
window.onServerLrptImage({ path: "/images/lrpt.png", geo_bounds: [50, 10, 55, 20], mcu_count: 100 });
|
||||
window.trxPluginRuntime.dispatch("lrpt_image", { path: "/images/lrpt.png", geo_bounds: [50, 10, 55, 20], mcu_count: 100 });
|
||||
assert.equal(overlays.length, 1);
|
||||
assert.deepEqual(overlays[0].geo_bounds, [50, 10, 55, 20]);
|
||||
assert.equal(typeof window.updateSatLiveState, "function");
|
||||
assert.equal(typeof window.resetSatHistoryView, "function");
|
||||
assert.equal(window.onServerLrptImage, undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user