diff --git a/ui/src/AppBoot.test.js b/ui/src/AppBoot.test.js index 705301c97..0f390bf58 100644 --- a/ui/src/AppBoot.test.js +++ b/ui/src/AppBoot.test.js @@ -87,4 +87,14 @@ describe("ParseDefaultFilters()", () => { expect(filters).toContain("foo=bar"); expect(filters).toContain("bar=~baz"); }); + + it("returns [] on filters attr that decodes to an object instead of an array", () => { + const filters = FiltersSetting({ foo: "bar" }); + expect(filters).toHaveLength(0); + }); + + it("returns [] on filters attr that decodes to a string instead of an array", () => { + const filters = FiltersSetting("foo=bar"); + expect(filters).toHaveLength(0); + }); });