ui-neu
Version:
Neu UI, a responsive React component library.
29 lines • 779 B
JavaScript
import React from "react";
import { act } from "react-dom/test-utils";
import ReactDom from "react-dom";
import { TextArea } from "./TextArea";
var container = null;
beforeEach(function () {
container = document.createElement("div");
document.body.appendChild(container);
});
afterEach(function () {
document.body.removeChild(container);
container = null;
});
it("render textarea and update", function () {
act(function () {
ReactDom.render( /*#__PURE__*/React.createElement(TextArea, {
placeholder: "test",
id: "test",
name: "test",
cols: 5,
row: 5
}), container);
});
var textarea = document.getElementById("test");
act(function () {
textarea.value = "test value";
});
expect(textarea.value).toBe("test value");
});