Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
futurGH committed Oct 16, 2022
1 parent 767b9b1 commit f73fca6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/test/utils/options/default-options.test.ts
Expand Up @@ -108,4 +108,32 @@ describe("Default Options", () => {
doesNotThrow(() => opts.setValue("searchGroupBoosts", { Enum: 5 }));
});
});

describe("headerLinks", () => {
it("Should disallow non-objects", () => {
throws(() => opts.setValue("headerLinks", null as never));
});

it("Should disallow non-strings", () => {
throws(() =>
opts.setValue("headerLinks", {
"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,
})
);
});
});
});

0 comments on commit f73fca6

Please sign in to comment.