1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/components/molecules/Pagination.test.tsx

18 lines
543 B
TypeScript
Raw Normal View History

2019-04-15 22:31:05 +02:00
import React from 'react'
import { render } from 'react-testing-library'
import Pagination from './Pagination'
2019-04-30 19:19:28 +02:00
describe('Pagination', () => {
2019-04-15 22:31:05 +02:00
it('renders without crashing', () => {
2019-04-15 22:46:49 +02:00
const { container } = render(
2019-04-15 22:31:05 +02:00
<Pagination
totalPages={20}
currentPage={1}
handlePageClick={() => Promise.resolve()}
/>
)
expect(container.firstChild).toBeInTheDocument()
2019-04-15 22:46:49 +02:00
container.firstChild && expect(container.firstChild.nodeName).toBe('UL')
2019-04-15 22:31:05 +02:00
})
})