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

24 lines
736 B
TypeScript

import React from 'react'
import { render } from '@testing-library/react'
import { MemoryRouter } from 'react-router'
import { createMemoryHistory, createLocation } from 'history'
import History from './History'
const history = createMemoryHistory()
const location = createLocation('/history')
describe('History', () => {
it('renders without crashing', () => {
const { container } = render(
<MemoryRouter>
<History
history={history}
location={location}
match={{ params: '', path: '', url: '', isExact: true }}
/>
</MemoryRouter>
)
expect(container.firstChild).toBeInTheDocument()
})
})