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

20 lines
606 B
TypeScript
Raw Normal View History

2019-04-30 19:19:28 +02:00
import React from 'react'
import { BrowserRouter as Router } from 'react-router-dom'
import { render } from '@testing-library/react'
2019-04-30 19:19:28 +02:00
import Routes from './Routes'
2019-05-31 12:56:13 +02:00
import { User } from './context'
import { userMockConnected } from '../__mocks__/user-mock'
2019-04-30 19:19:28 +02:00
describe('Routes', () => {
it('renders without crashing', () => {
const { container } = render(
2019-05-31 12:56:13 +02:00
<User.Provider value={userMockConnected}>
<Router>
<Routes />
</Router>
</User.Provider>
2019-04-30 19:19:28 +02:00
)
expect(container.firstChild).toBeInTheDocument()
})
})