UNPKG

@shopgate/engage

Version:
1 lines 1.25 kB
/* eslint-disable require-jsdoc */import React from'react';import{shallow}from'enzyme';import ProductSlider from"./index";jest.mock('@shopgate/engage/core',function(){return{useWidgetSettings:jest.fn()};});jest.mock('@shopgate/engage/components',function(){var Swiper=function Swiper(_ref){var children=_ref.children;return children;};Swiper.Item=function(_ref2){var children=_ref2.children;return children;};Swiper.Item.displayName='Swiper.Item';return{Swiper:Swiper};});jest.mock('@shopgate/engage/product',function(){return{ProductListTypeProvider:function ProductListTypeProvider(_ref3){var children=_ref3.children;return children;},ProductListEntryProvider:function ProductListEntryProvider(_ref4){var children=_ref4.children;return children;}};});jest.mock('@shopgate/pwa-common/context',function(){var ProductCard=function ProductCard(props){return React.createElement(ProductCard,props);};return{Theme:function Theme(_ref5){var children=_ref5.children;return children({ProductCard:ProductCard});}};});describe('<ProductSlider />',function(){it('should match snapshot',function(){var wrapper=shallow(React.createElement(ProductSlider,{productIds:['prod1']})).dive();expect(wrapper).toMatchSnapshot();});});/* eslint-enable require-jsdoc */