From dc602ae54382633a25cb9f40c46531484a6ae5fb Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 4 Jun 2026 17:51:41 +0200 Subject: [PATCH] Extend the `AppOptions` unit-tests to also cover the `EVENT_DISPATCH` option-kind --- test/unit/app_options_spec.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/unit/app_options_spec.js b/test/unit/app_options_spec.js index 8aa945b7b..fd143814d 100644 --- a/test/unit/app_options_spec.js +++ b/test/unit/app_options_spec.js @@ -19,10 +19,16 @@ import { objectSize } from "../../src/shared/util.js"; describe("AppOptions", function () { it("checks that getAll returns data, for every OptionKind", function () { - const KIND_NAMES = ["BROWSER", "VIEWER", "API", "WORKER", "PREFERENCE"]; + expect(Object.keys(OptionKind)).toEqual([ + "BROWSER", + "VIEWER", + "API", + "WORKER", + "EVENT_DISPATCH", + "PREFERENCE", + ]); - for (const name of KIND_NAMES) { - const kind = OptionKind[name]; + for (const kind of Object.values(OptionKind)) { expect(typeof kind).toEqual("number"); const options = AppOptions.getAll(kind);