@shopgate/pwa-common
Version:
Common library for the Shopgate Connect PWA.
1 lines • 688 B
JavaScript
import React from'react';import{shallow}from'enzyme';import Grid from"./index";describe('<Grid />',function(){it('should render without any further props',function(){var wrapper=shallow(React.createElement(Grid,null));expect(wrapper).toMatchSnapshot();});it('should be able to render a custom tag',function(){var wrapper=shallow(React.createElement(Grid,{component:"article"}));expect(wrapper).toMatchSnapshot();expect(wrapper.type()).toEqual('article');});it('should add custom classes on demand',function(){var wrapper=shallow(React.createElement(Grid,{className:"custom-class-name"}));expect(wrapper).toMatchSnapshot();expect(wrapper.hasClass('custom-class-name')).toEqual(true);});});