From 3badd681f11fa37e77ee93e3b22aced3792a6f0c Mon Sep 17 00:00:00 2001 From: futurGH Date: Sun, 16 Oct 2022 11:37:31 -0400 Subject: [PATCH] Tests --- .../utils/options/default-options.test.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/test/utils/options/default-options.test.ts b/src/test/utils/options/default-options.test.ts index 63badd718..3b02fd1fb 100644 --- a/src/test/utils/options/default-options.test.ts +++ b/src/test/utils/options/default-options.test.ts @@ -108,4 +108,32 @@ describe("Default Options", () => { doesNotThrow(() => opts.setValue("searchGroupBoosts", { Enum: 5 })); }); }); + + describe("headerLinks", () => { + it("Should disallow non-objects", () => { + throws(() => opts.setValue("navigationLinks", null as never)); + }); + + it("Should disallow non-strings", () => { + throws(() => + opts.setValue("navigationLinks", { + "Home": true as any as string, + }) + ); + }); + }); + + describe("sidebarLinks", () => { + it("Should disallow non-objects", () => { + throws(() => opts.setValue("sidebarLinks", null as never)); + }); + + it("Should disallow non-strings", () => { + throws(() => + opts.setValue("sidebarLinks", { + "Home": true as any as string, + }) + ); + }); + }); });