UNPKG

@upendradevsingh/webcore

Version:
43 lines (36 loc) 906 B
import React from "react"; import { addons } from 'react-addons-create-fragment'; import {expect} from 'chai'; import {render, shallow} from 'enzyme'; import Modal from "../Modal"; const wrapper = render(<Modal header={true} footer={true} customBodyClass="" title="Modal Title" dataContent={{ "data": { "name": "yogendra" }, "headers": {}, "method": "GET" }} optionType="link" dataUrl="https://jsonplaceholder.typicode.com/users" dialogLinkContent="Open Me" dataTarget=""> {"Initial Content"} </Modal>); describe("<Modal />", () => { it("should render children when supplied", () => { expect(wrapper) .to .have .length(1); }); it("should return the props when supplied", () => { expect(wrapper) .to .have .length(1); }); });