fix(tests): correctly fail mock requests

This commit is contained in:
Łukasz Mierzwa
2019-12-20 21:57:52 +00:00
parent 9b064336cd
commit cdd74396e8
7 changed files with 19 additions and 37 deletions

View File

@@ -146,7 +146,7 @@ describe("<AlertGroupSortConfiguration />", () => {
});
it("label select handles fetch errors", async () => {
fetch.mockReject("error");
fetch.mockReject(new Error("Fetch error"));
const tree = await ExpandSortLabelSuggestions();
const options = tree.find("div.react-select__option");
expect(options).toHaveLength(0);