UNPKG

@shopgate/pwa-common

Version:

Common library for the Shopgate Connect PWA.

24 lines 827 B
import React from 'react'; import { shallow } from 'enzyme'; import Grid from "./index"; import { jsx as _jsx } from "react/jsx-runtime"; describe('<Grid />', () => { it('should render without any further props', () => { const wrapper = shallow(/*#__PURE__*/_jsx(Grid, {})); expect(wrapper).toMatchSnapshot(); }); it('should be able to render a custom tag', () => { const wrapper = shallow(/*#__PURE__*/_jsx(Grid, { component: "article" })); expect(wrapper).toMatchSnapshot(); expect(wrapper.type()).toEqual('article'); }); it('should add custom classes on demand', () => { const wrapper = shallow(/*#__PURE__*/_jsx(Grid, { className: "custom-class-name" })); expect(wrapper).toMatchSnapshot(); expect(wrapper.hasClass('custom-class-name')).toEqual(true); }); });