fix(tests): add test coverage for missed branches in AppBoot

This commit is contained in:
Łukasz Mierzwa
2018-09-02 16:45:40 +01:00
parent f18cc76f6d
commit fbdea79354

View File

@@ -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);
});
});