refactor: add typed decoder plugin runtime
This commit is contained in:
@@ -21,11 +21,13 @@ test("HF APRS entry uses shared typed normalization and local symbols", async ()
|
||||
Reflect,
|
||||
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/hf-aprs.js", import.meta.url), "utf8");
|
||||
assert.equal(source.includes("raw.githubusercontent.com"), false);
|
||||
new vm.Script(runtime).runInContext(context);
|
||||
new vm.Script(source).runInContext(context);
|
||||
|
||||
window.onServerHfAprs({ src_call: "SP0ABC", dest_call: "APRS", crc_ok: true, symbol_table: "/", symbol_code: ">" });
|
||||
assert.equal(typeof window.restoreHfAprsHistory, "function");
|
||||
assert.equal(typeof window.pruneHfAprsHistoryView, "function");
|
||||
window.trxPluginRuntime.dispatch("hf_aprs", { src_call: "SP0ABC", dest_call: "APRS", crc_ok: true, symbol_table: "/", symbol_code: ">" });
|
||||
assert.equal(window.onServerHfAprs, undefined);
|
||||
assert.equal(window.trxPluginRuntime.hasDecoder("hf_aprs"), true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user