import React from "react" ; import TestRenderer from "react-test-renderer" ; import { PropTypesOf } from "coral-framework/types" ; import Icon from "./Icon" ; it ( "renders correctly" , ( ) => { const props = { children : "face" , } ; const renderer = TestRenderer . create ( < Icon { ... props } / > ) ; expect ( renderer . toJSON ( ) ) . toMatchSnapshot ( ) ; } ) ; it ( "renders correctly with specified size" , ( ) => { const props = { size : "lg" , children : "bookmark" , } ; const renderer = TestRenderer . create ( < Icon { ... props } / > ) ; expect ( renderer . toJSON ( ) ) . toMatchSnapshot ( ) ; } ) ;