import React from 'react' ; import { shallow } from 'enzyme' ; import { Paging , ResultsPerPage } from '@elastic/react-search-ui' ; import { Pagination } from './pagination' ; describe ( 'Pagination' , ( ) => { it ( 'renders' , ( ) => { const wrapper = shallow ( < Pagination aria - label = "foo" / > ) ; expect ( wrapper . find ( Paging ) . exists ( ) ) . toBe ( true ) ; expect ( wrapper . find ( ResultsPerPage ) . exists ( ) ) . toBe ( true ) ; } ) ; it ( 'passes aria-label through to Paging' , ( ) => { const wrapper = shallow ( < Pagination aria - label = "foo" / > ) ; expect ( wrapper . find ( Paging ) . prop ( 'aria-label' ) ) . toEqual ( 'foo' ) ; } ) ; } ) ;