isJSONField and copyInfoText props are tested

This commit is contained in:
Vladimir Khvan 2023-01-22 16:56:40 +05:00
parent b5872c259b
commit fd3dcce5b6

View File

@ -64,4 +64,32 @@ describe("<Textarea />", () => {
expect(wrapper.prop("heightTextArea")).toEqual(54);
});
it("accepts copyInfoText", () => {
const wrapper = mount(
<Textarea
placeholder="Add comment"
onChange={jest.fn()}
value="value"
className="test"
copyInfoText='text was copied'
/>
);
expect(wrapper.prop("copyInfoText")).toEqual('text was copied');
});
it("accepts isJSONField", () => {
const wrapper = mount(
<Textarea
placeholder="Add comment"
onChange={jest.fn()}
value="value"
className="test"
isJSONField={true}
/>
);
expect(wrapper.prop("isJSONField")).toEqual(true);
});
});