diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.js index b818651650..278dbfba51 100644 --- a/frontend_tests/node_tests/compose.js +++ b/frontend_tests/node_tests/compose.js @@ -3,6 +3,8 @@ const {JSDOM} = require("jsdom"); const rewiremock = require("rewiremock/node"); +const events = require("./lib/events.js"); + set_global("bridge", false); const noop = function () {}; @@ -1495,10 +1497,10 @@ run_test("on_events", () => { window.open = function (url) { assert(url.endsWith("/calls/zoom/register")); - server_events_dispatch.dispatch_normal_event({ - type: "has_zoom_token", - value: true, - }); + + // The event here has value=true. We keep it in events.js to + // allow our tooling to verify its schema. + server_events_dispatch.dispatch_normal_event(events.fixtures.has_zoom_token); }; channel.post = function (payload) { diff --git a/frontend_tests/node_tests/lib/events.js b/frontend_tests/node_tests/lib/events.js index 95755a17f4..b5d30e8048 100644 --- a/frontend_tests/node_tests/lib/events.js +++ b/frontend_tests/node_tests/lib/events.js @@ -131,6 +131,11 @@ exports.fixtures = { topic: "topic1", }, + has_zoom_token: { + type: "has_zoom_token", + value: true, + }, + hotspots: { type: "hotspots", hotspots: [