diff --git a/src/renderer/components/select/select.test.tsx b/src/renderer/components/select/select.test.tsx index df745e41bc..157156e02a 100644 --- a/src/renderer/components/select/select.test.tsx +++ b/src/renderer/components/select/select.test.tsx @@ -107,7 +107,7 @@ describe("", () => { expect(container.querySelector(".Select__single-value")).not.toBeInTheDocument(); }); + + it("should unselect value if undefined is passed as a value", async () => { + const options = [ + { + label: "Option one label", + value: "optionOneValue", + }, + { + label: "Option two label", + value: "optionTwoValue", + }, + ]; + + const onChange = jest.fn(); + + const { container, rerender } = render(); + + expect(container.querySelector(".Select__single-value")).not.toBeInTheDocument(); + }); });