Skip to content

Commit 3badd68

Browse files
committed
Tests
1 parent 767b9b1 commit 3badd68

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/test/utils/options/default-options.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,32 @@ describe("Default Options", () => {
108108
doesNotThrow(() => opts.setValue("searchGroupBoosts", { Enum: 5 }));
109109
});
110110
});
111+
112+
describe("headerLinks", () => {
113+
it("Should disallow non-objects", () => {
114+
throws(() => opts.setValue("navigationLinks", null as never));
115+
});
116+
117+
it("Should disallow non-strings", () => {
118+
throws(() =>
119+
opts.setValue("navigationLinks", {
120+
"Home": true as any as string,
121+
})
122+
);
123+
});
124+
});
125+
126+
describe("sidebarLinks", () => {
127+
it("Should disallow non-objects", () => {
128+
throws(() => opts.setValue("sidebarLinks", null as never));
129+
});
130+
131+
it("Should disallow non-strings", () => {
132+
throws(() =>
133+
opts.setValue("sidebarLinks", {
134+
"Home": true as any as string,
135+
})
136+
);
137+
});
138+
});
111139
});

0 commit comments

Comments
 (0)