UNPKG

ui-neu

Version:

Neu UI, a responsive React component library.

36 lines 1.08 kB
import React from "react"; import { act } from "react-dom/test-utils"; import { render, unmountComponentAtNode } from "react-dom"; import { Check, Radio } from "./Check"; describe("Check test suite", function () { var container = null; beforeEach(function () { container = document.createElement("div"); document.body.appendChild(container); }); afterEach(function () { unmountComponentAtNode(container); container.remove(); container = null; }); it("renders Check children props", function () { act(function () { render( /*#__PURE__*/React.createElement(Check, { name: "Check Name", label: "Check Label", id: "Check ID" }), container); }); expect(container.textContent).toBe("Check Label"); }); it("renders Radio children props", function () { act(function () { render( /*#__PURE__*/React.createElement(Radio, { name: "Radio Name", label: "Radio Label", id: "Radio ID" }), container); }); expect(container.textContent).toBe("Radio Label"); }); });