import { mount } from 'enzyme' ; import React from 'react' ; import DesktopApps from './DesktopApps' ; import * as Styled from './DesktopApps.styles' ; import DesktopButton from '../DesktopButton/DesktopButton' ; import { withReduxAndStyledProviders } from '../../test/testUtils' ; returns { JSX . Element } const setup = ( ) => { return mount ( withReduxAndStyledProviders ( < DesktopApps />)); } ; describe ( 'DesktopApps' , ( ) => { const wrap = setup ( ) ; it ( 'should render without throwing an error' , ( ) => { expect ( wrap ) ; expect ( wrap . length ) . toBe ( 1 ) ; } ) ; it ( 'should render list with apps' , ( ) => { const list = wrap . find ( Styled . UL ) ; expect ( list . length ) . toBe ( 1 ) ; } ) ; it ( 'should render correct number of desktop apps' , ( ) => { const desktopApps = wrap . find ( DesktopButton ) ; expect ( desktopApps . length ) . toBe ( 11 ) ; } ) ; } ) ;