react-conditional-components-renderer
Version:
React library with conditional components to rendering
17 lines (16 loc) • 764 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_2 = require("@testing-library/react");
const Case_1 = __importDefault(require("../Case"));
describe("<Case />", () => {
test(`should render when has any children`, () => {
const { getByText } = (0, react_2.render)(react_1.default.createElement(Case_1.default, { identifier: "a" },
react_1.default.createElement("div", null, "Show A component")));
const elementText = getByText(/Show A component/i);
expect(elementText).toBeTruthy();
});
});