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").textContent).toBe(options[1].label);
});
- it("should unselect value if no value is passed", async () => {
+ it("should unselect value if null is passed as a value", async () => {
const options = [
{
label: "Option one label",
@@ -130,4 +130,28 @@ 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();
+ const selectedValueContainer = container.querySelector(".Select__single-value");
+
+ expect(selectedValueContainer.textContent).toBe(options[0].label);
+
+ rerender();
+
+ expect(container.querySelector(".Select__single-value")).not.toBeInTheDocument();
+ });
});